Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.adapter.cci
Class ConnectionFactoryImpl

    java.lang.Object
      |
      +--com.bea.adapter.cci.ConnectionFactoryImpl

public class ConnectionFactoryImpl
extends java.lang.Object
implements javax.resource.cci.ConnectionFactory, java.io.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 © 2000, 2001 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 javax.naming.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; used when a component requires the container to manage EIS sign-on, i.e.
`javax.resource.cci.Connection` | `getConnection(javax.resource.cci.ConnectionSpec cspec)` Gets a connection to an EIS instance; used when a component manages EIS sign-on, i.e.
`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()`
`javax.naming.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(javax.naming.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 javax.naming.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)
                          throws javax.resource.ResourceException

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

  Parameters:
    `managedConnectionFactory` - - 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, i.e. the client does not pass any security related information.
  Specified by:
    getConnection in interface javax.resource.cci.ConnectionFactory

### 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, i.e. the client passes security related information.
  Specified by:
    getConnection in interface javax.resource.cci.ConnectionFactory

### 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

### getReference

    public javax.naming.Reference getReference()
                                        throws javax.naming.NamingException

### setReference

    public void setReference(javax.naming.Reference reference)

  Specified by:
    setReference in interface javax.resource.Referenceable

### getRecordFactory

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

  Specified by:
    getRecordFactory in interface javax.resource.cci.ConnectionFactory

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Integration (WLI)