Creating a WmManagedConnection Implementation Class
You create a connection by extending the abstract base class WmManagedConnection. In the example shown in
Adapter Connection Implementation
Classes, this class is SimpleConnection.
The WmManagedConnection implementation class is primarily responsible for wrapping the connection to your resource. The method in the connection factory that instantiates this class receives information from the connection factory. Accessing the resource is your responsibility.
In this class, you override the following methods:
Method | Description |
adapterCheckValue | Supports metadata for associated services and notifications. |
adapterResourceDomainLookup | Supports metadata for associated services and notifications. |
destroyConnection | This method is called when the connection is removed from the pool, freeing implementation-specific resources. |
initializationRequired | This method should return True if initializeConnection is present in the implementation class. |
initializeConnection | This method is called once if initializationRequired returns True. Optional. |
registerResourceDomain | Supports metadata for associated services and notifications. |
For examples of these methods, see
Example WmManagedConnection Implementation
Class. (The initializeConnection and initializationRequired methods are not used in this example) For more information, see the Javadoc.