org.openejb.spi
Interface ConnectionManagerFactory
- All Known Implementing Classes:
- BaseCMFactory
- public interface ConnectionManagerFactory
Interface for a service that creates ConnectionManager implementations on
demand. This is used to interface custom ConnectionManagers with
OpenEJB. The exact method of identifying and loading
ConnectionManagerFactory instances depends on the Assembler implementation
you're using.
- Version:
- $Revision: 1.2 $
- Author:
- Aaron Mulder (ammulder@alumni.princeton.edu)
Method Summary |
OpenEJBConnectionManager |
createConnectionManager(java.lang.String name,
ConnectionManagerConfig config,
javax.resource.spi.ManagedConnectionFactory factory)
Create a ConnectionManager to use for the specified
ManagedConnectionFactory. |
void |
setLogWriter(java.io.PrintWriter logger)
Provides logging capabilities, which should be passed on to
ConnectionManager instances created by this factory. |
void |
setProperties(java.util.Properties props)
Configures the factory itself. |
setLogWriter
public void setLogWriter(java.io.PrintWriter logger)
- Provides logging capabilities, which should be passed on to
ConnectionManager instances created by this factory.
Note: This method will go away once
Logging is made a primary service of OpenEJB.
setProperties
public void setProperties(java.util.Properties props)
- Configures the factory itself. If the factory does not require
additional configuration it may provide an empty implementation.
createConnectionManager
public OpenEJBConnectionManager createConnectionManager(java.lang.String name,
ConnectionManagerConfig config,
javax.resource.spi.ManagedConnectionFactory factory)
throws OpenEJBException
- Create a ConnectionManager to use for the specified
ManagedConnectionFactory. This method may return the same
ConnectionManager from different calls, if a single
ConnectionManager instance can handle multiple
ManagedConnectionFactories, but that is not required.
- Parameters:
name
- The deployment ID of the connector, which may be used
for logging, etc.properties
- The deployment properties for this combination of
ConnectionManager and ManagedConnectionFactory,
which includes things like connection pool
parameters.factory
- The ManagedConnectionFactory to configure a
ConnectionManager for.