1. A method for last-agent optimization, comprising: establishing a connection to each resource in a plurality of resources for an application; determining a current transactional context; gathering usage statistics associated with each resource; and heuristically determining an order of each resource in the current transactional context to achieve last-agent optimization based at least in part on the usage statistics.