Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.adapter.cci
Class ConnectionFactoryImpl

    java.lang.Object
      com.bea.adapter.cci.ConnectionFactoryImpl

All Implemented Interfaces:
  IProxyMarker, Serializable, Referenceable, javax.resource.cci.ConnectionFactory

    public class ConnectionFactoryImpl

extends Object
implements javax.resource.cci.ConnectionFactory, Serializable, javax.resource.Referenceable, IProxyMarker

A simple, concrete implementation of the CCI ConnectionFactory interface. Provides basic logging support and resource adapter metadata. Adapter developers should not need to extend this class in most cases.

Author:
  Copyright (c) 1998-2000 by BEA Systems, Inc. All Rights Reserved.
See Also:
  Serialized Form

Field Summary
`protected javax.resource.spi.ConnectionManager` | `m_connectionManager`
`protected javax.resource.spi.ManagedConnectionFactory` | `m_managedConnectionFactory`
`protected Reference` | `m_reference`
`protected ResourceAdapterMetaDataImpl` | `m_resourceAdapterMetaData`

Constructor Summary
`ConnectionFactoryImpl()` Default constructor
`ConnectionFactoryImpl(javax.resource.spi.ManagedConnectionFactory connectionFactory, javax.resource.spi.ConnectionManager connectionManager, ResourceAdapterMetaDataImpl resourceAdapterMetaData, LogContext logContext)` Constructs an instance to create EIS specific application component connection handles.

Method Summary
`javax.resource.cci.Connection` | `getConnection()` Gets a connection to an EIS instance.
`javax.resource.cci.Connection` | `getConnection(javax.resource.cci.ConnectionSpec cspec)` Gets a connection to an EIS instance.
`LogContext` | `getLogContext()` Retrieves an object that determines the logging configuration for this instance in the logging framework.
`ILogger` | `getLogger()` Retrieves an object used to log information to.
`javax.resource.cci.ResourceAdapterMetaData` | `getMetaData()`
`javax.resource.cci.RecordFactory` | `getRecordFactory()`
`Reference` | `getReference()`
`protected javax.resource.spi.ConnectionRequestInfo` | `mapConnectionSpecToConnectionRequestInfo(javax.resource.cci.ConnectionSpec cspec)` This method gets invoked if the ConnectionSpec instance that is passed to the getConnection method is not a java.util.Map or a ConnectionRequestInfo.
`void` | `setReference(Reference reference)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_managedConnectionFactory

    protected javax.resource.spi.ManagedConnectionFactory m_managedConnectionFactory

### m_connectionManager

    protected javax.resource.spi.ConnectionManager m_connectionManager

### m_reference

    protected Reference m_reference

### m_resourceAdapterMetaData

    protected ResourceAdapterMetaDataImpl m_resourceAdapterMetaData

Constructor Detail

### ConnectionFactoryImpl

    public ConnectionFactoryImpl()

  Default constructor

  Since:
    j2ee_connector-1_0-pfd2-spec.pdf, page 104

### ConnectionFactoryImpl

    public ConnectionFactoryImpl(javax.resource.spi.ManagedConnectionFactory connectionFactory,
                                 javax.resource.spi.ConnectionManager connectionManager,
                                 ResourceAdapterMetaDataImpl resourceAdapterMetaData,
                                 LogContext logContext)

  Constructs an instance to create EIS specific application component connection handles.

  Parameters:
    `connectionFactory` - - instance is a factory of both Managed connection and connection factory instances
    `connectionManager` - - provides a hook for resource adapter to pass a connection request to an application server

Method Detail

### getConnection

    public javax.resource.cci.Connection getConnection()
                                                throws javax.resource.ResourceException

  Gets a connection to an EIS instance. Used when a component requires the container to manage EIS sign-on, in other words, the client does not pass any security related information.

  Specified by:
    `getConnection` in interface `javax.resource.cci.ConnectionFactory`
  Throws:
    `javax.resource.ResourceException`

### getConnection

    public javax.resource.cci.Connection getConnection(javax.resource.cci.ConnectionSpec cspec)
                                                throws javax.resource.ResourceException

  Gets a connection to an EIS instance. Used when a component manages EIS sign-on, in other words, the client passes security related information.

  Specified by:
    `getConnection` in interface `javax.resource.cci.ConnectionFactory`
  Throws:
    `javax.resource.ResourceException`

### mapConnectionSpecToConnectionRequestInfo

    protected javax.resource.spi.ConnectionRequestInfo mapConnectionSpecToConnectionRequestInfo(javax.resource.cci.ConnectionSpec cspec)
                                                                                         throws javax.resource.ResourceException

  This method gets invoked if the ConnectionSpec instance that is passed to the getConnection method is not a java.util.Map or a ConnectionRequestInfo. This method will generate a ResourceException by default. Adapter developers should over-ride this method to establish their own adapter specific mapping between a ConnnectionSpec and a ConnectionRequestInfo object. Typically, this is the only functionality that differs across adapters for the implementation of the getConnection method. Thus, it is easier to over-ride this method vs. re-writing most of the same logic in getConnection(ConnectionSpec).

  Returns:
    a ConnectionRequestInfo object that contains information from the ConnectionSpec parameter.
  Throws:
    `javax.resource.ResourceException` - by default; adapter developers should over-ride this method to establish their own mapping scheme.

### getLogContext

    public LogContext getLogContext()

  Retrieves an object that determines the logging configuration for this instance in the logging framework.

  Returns:
    an object that determines the logging configuration for this instance.

### getLogger

    public ILogger getLogger()

  Retrieves an object used to log information to. This uses the adapter's logical name to determine its logger. Adapter developers can override this to return a logger that is not based solely on the supplied logging context.

  Returns:
    an object used to log information to.

### getMetaData

    public javax.resource.cci.ResourceAdapterMetaData getMetaData()
                                                           throws javax.resource.ResourceException

  Specified by:
    `getMetaData` in interface `javax.resource.cci.ConnectionFactory`
  Throws:
    `javax.resource.ResourceException`

### getReference

    public Reference getReference()
                           throws NamingException

  Specified by:
    `getReference` in interface `Referenceable`
  Throws:
    `NamingException`

### setReference

    public void setReference(Reference reference)

### getRecordFactory

    public javax.resource.cci.RecordFactory getRecordFactory()
                                                      throws javax.resource.ResourceException

  Specified by:
    `getRecordFactory` in interface `javax.resource.cci.ConnectionFactory`
  Throws:
    `javax.resource.ResourceException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD