org.openejb.alt.connectors.minerva
Class BaseCMFactory

java.lang.Object
  |
  +--org.openejb.alt.connectors.minerva.BaseCMFactory
All Implemented Interfaces:
ConnectionManagerFactory
Direct Known Subclasses:
NoTransCMFactory, SharedLocalCMFactory, XACMFactory

public abstract class BaseCMFactory
extends java.lang.Object
implements ConnectionManagerFactory

Abstract base class for Minerva connection manager factories. The logic is the same for all the factories; the only difference is which implementation of ConnectionManager they return.

Version:
$Revision: 1.2 $

Constructor Summary
BaseCMFactory()
           
 
Method Summary
protected abstract  org.opentools.minerva.connector.BaseConnectionManager createConnectionManager()
          Creates a Minerva ConnectionManager of the appropriate type for this factory.
 OpenEJBConnectionManager createConnectionManager(java.lang.String name, ConnectionManagerConfig config, javax.resource.spi.ManagedConnectionFactory factory)
          Configures this factory's ConnectionManager instance for the specified factory, and returns it.
 void setLogWriter(java.io.PrintWriter logger)
          Sets the logger to use for this factory and its ConnectionManager.
 void setProperties(java.util.Properties props)
          Configures this factory.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseCMFactory

public BaseCMFactory()
Method Detail

createConnectionManager

protected abstract org.opentools.minerva.connector.BaseConnectionManager createConnectionManager()
Creates a Minerva ConnectionManager of the appropriate type for this factory.

setLogWriter

public void setLogWriter(java.io.PrintWriter logger)
Sets the logger to use for this factory and its ConnectionManager.
Specified by:
setLogWriter in interface ConnectionManagerFactory

setProperties

public void setProperties(java.util.Properties props)
Configures this factory. There is not currently any configuration necessary, so this method does nothing.
Specified by:
setProperties in interface ConnectionManagerFactory

createConnectionManager

public OpenEJBConnectionManager createConnectionManager(java.lang.String name,
                                                        ConnectionManagerConfig config,
                                                        javax.resource.spi.ManagedConnectionFactory factory)
                                                 throws OpenEJBException
Configures this factory's ConnectionManager instance for the specified factory, and returns it. This method always returns a proxy wrapping the same ConnectionManager implementation. The proxy is there to manage the setting for container managed vs. bean managed sign on to the resource adapter.
Specified by:
createConnectionManager in interface ConnectionManagerFactory
Following copied from interface: org.openejb.spi.ConnectionManagerFactory
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.