Adapter Development Kit 9.12 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Runtime Activities | Runtime Connection Allocation for Adapter Services | Implementing Partitioned Connection Pools | Implementing WmConnectionRequestInfo
 
Implementing WmConnectionRequestInfo
A ConnectionRequestInfo object defines a partition both within the connection pool and in WmManagedConnectionFactory.createManagedConnectionObject when a new connection is created. The connection pool organized its connections based on the ConnectionRequestInfo object used when the connection was created. In this case, ConnectionRequestInfo objects X and Y are considered the same if X.hashCode() == Y.hashCode() && X.equals(Y). The remainder of the ConnectionRequestInfo implementation is defined by the adapter.
1. Create a class by extending the com.wm.adk.connection.WmConnectionRequestInfo base class.
In the example, a MbConnectionRequestInfo class is created.
2. Create a partition with which the backend connection is established.
In the example, a partition is defined by the userId with which the backend connection is established.
3. Add the methods to ensure that the connection pool properly recognizes objects that refer to the same partition.
In the example, the hashCode and equals methods refer to the userId.
4. Implement the getLogableName abstract method to provide a partition name that can be recorded in Integration Server logs.
In the example, getLogableName method is also used to correlate the MegaBank user name with the ID used to access the backend.
Note:
Care must be taken in implementing this method to avoid exposing any sensitive data such as passwords.