org.openejb.spi
Interface ConnectionManagerFactory


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: 1921 $
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.
 

Method Detail

setLogWriter

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

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

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.
config - configuration
factory - The ManagedConnectionFactory to configure a ConnectionManager for.
Throws:
OpenEJBException


Copyright © 1999-2011 OpenEJB. All Rights Reserved.