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

## javax.resource.spi
Interface ManagedConnectionFactory

All Superinterfaces:
  Serializable

public interface ManagedConnectionFactory
extends Serializable

A ManagedConnectionFactory is a factory for the creation of ManagedConnection objects and ConnectionFactory objects. It provides methods which can be used to match ManagedConnetions.

Method Summary
`Object` | `createConnectionFactory()` Creates a connection factory instance.
`Object` | `createConnectionFactory(ConnectionManager cxManager)` Creates a connection factory instance.
`ManagedConnection` | `createManagedConnection(Subject subject, ConnectionRequestInfo cxRequestInfo)` Creates a new ManagedConnection
`boolean` | `equals(Object other)` Tests object for equality
`PrintWriter` | `getLogWriter()` Gets the logwriter for this instance.
`int` | `hashCode()` Generates a hashCode for this object
`ManagedConnection` | `matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo cxRequestInfo)` Returns a matching connection from the set.
`void` | `setLogWriter(PrintWriter out)` Sets the logwriter for this instance.

Method Detail

### createConnectionFactory

    public Object createConnectionFactory()
                                   throws ResourceException

  Creates a connection factory instance. The connection manager is provided by the resource adapter.

  Returns:
    the connection factory
  Throws:
    `ResourceException` - for a generic error
    `ResourceAdapterInternalException` - for an internal error in the resource adapter

### createConnectionFactory

    public Object createConnectionFactory(ConnectionManager cxManager)
                                   throws ResourceException

  Creates a connection factory instance. the connection manager is provided by the application server

  Parameters:
    `cxManager` - the connection manager
  Returns:
    the connection factory
  Throws:
    `ResourceException` - for a generic error
    `ResourceAdapterInternalException` - for an internal error in the resource adapter

### createManagedConnection

    public ManagedConnection createManagedConnection(Subject subject,
                                                     ConnectionRequestInfo cxRequestInfo)
                                              throws ResourceException

  Creates a new ManagedConnection

  Parameters:
    `subject` - the subject
    `cxRequestInfo` - the connection request info
  Returns:
    the managed connection
  Throws:
    `ResourceException` - for a generic error
    `ResourceAllocationException` - for an error allocting resources
    `ResourceAdapterInternalException` - for an internal error in the resource adapter
    `SecurityException` - for a security problem
    `EISSystemException` - for an error from the EIS

### matchManagedConnections

    public ManagedConnection matchManagedConnections(Set connectionSet,
                                                     Subject subject,
                                                     ConnectionRequestInfo cxRequestInfo)
                                              throws ResourceException

  Returns a matching connection from the set.

  Parameters:
    `connectionSet` - the connection set
    `subject` - the subject
    `cxRequestInfo` - the connection request info
  Returns:
    the managed connection
  Throws:
    `ResourceException` - for a generic error
    `ResourceAdapterInternalException` - for an internal error in the resource adapter
    `SecurityException` - for a security problem
    `NotSupportedException` - if not supported

### getLogWriter

    public PrintWriter getLogWriter()
                             throws ResourceException

  Gets the logwriter for this instance.

  Returns:
    the log writer
  Throws:
    `ResourceException` - for a generic error

### setLogWriter

    public void setLogWriter(PrintWriter out)
                      throws ResourceException

  Sets the logwriter for this instance.

  Parameters:
    `out` - the log writer
  Throws:
    `ResourceException` - for a generic error
    `ResourceAdapterInternalException` - for an internal error in the resource adapter

### equals

    public boolean equals(Object other)

  Tests object for equality

  Parameters:
    `other` - the other object
  Returns:
    true when equals, false otherwise

### hashCode

    public int hashCode()

  Generates a hashCode for this object

  Returns:
    the hash code

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

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.