If you are migrating from Websphere Application Server Version 3.5.x or Version 4.0.x to WebSphere Application Server Version 5.0.x, and you are running servlets, JavaServer Page (JSP) files, or enterprise session beans with bean managed transactions, a behavior change in the data access component can adversly affect the use of connections in your applications.
This change affects all applications that contain the following methods:
Symptoms of the problem include:
In Websphere Application Server Version 4.0.x and earlier releases, JSP files, servlets, and enterprise session beans with bean managed transactions are issued non-sharable connections, while all the other components are issued shareable connections.
Starting with Websphere Version 5.0.x, all connections that are accessed with a resource-reference, default to shareable unless specified unshareable in the resource-reference. This change is required for compliance with the J2EE 1.3 Specification. Using shareable connections in this context has the following effects:
For example, if session bean 1 gets a connection and then calls session bean 2 that also gets a connection, even if all properties are identical, each session bean receives its own connection.
If you did not anticipate this behavior, the way you structure your application code could lead to excessive connection use, particularly in the cases of JSP includes, RequestDispatcher.include() routines, RequestDispatcher.forward() routines, session beans with bean managed transactions, or calls from these methods to other components.
To resolve these problems:
If you use an unshared connection and are not in a user transaction, the connection is returned to the free pool when you issue a close(), (assuming you committed or rolled back the connection).
To calculate the number of required connections, multiply the number of configured threads by the deepest level of component call nesting (for those calls that use connections). See the Examples section for a description of call nesting.