Product SiteDocumentation Site

3.6. Externally controlled connections

For a transactional application whose transaction states are managed by an application server, its resources must also be managed by the application server so that transaction association is performed properly. If an application is associated with a transaction, the application must not perform transactional work through the connection without having the connection’s resource object already associated with the global transaction. The application server must ensure that the XAResource object in use is associated with the transaction, by invoking the Transaction.enlistResource method.
If a server-side transactional application retains its database connection across multiple client requests, the application server must ensure that before dispatching a client request to the application thread, the resource is enlisted with the application’s current transaction context. This implies that the application server manages the connection resource usage status across multiple method invocations.