org.jboss.jca.core.api.connectionmanager

## Interface ConnectionManager

- All Superinterfaces:
    javax.resource.spi.ConnectionManager, javax.resource.spi.LazyAssociatableConnectionManager, javax.resource.spi.LazyEnlistableConnectionManager, java.io.Serializable

      public interface ConnectionManager
      extends javax.resource.spi.ConnectionManager, javax.resource.spi.LazyAssociatableConnectionManager, javax.resource.spi.LazyEnlistableConnectionManager

  The JBoss specific connection manager interface.
  Author:
    Gurkan Erdogdu, Jesper Pedersen

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.resource.spi.ManagedConnection` | `associateManagedConnection(java.lang.Object connection, javax.resource.spi.ManagedConnectionFactory mcf, javax.resource.spi.ConnectionRequestInfo cri)` Associate a managed connection to a logical connection
    `boolean` | `dissociateManagedConnection(java.lang.Object connection, javax.resource.spi.ManagedConnection mc, javax.resource.spi.ManagedConnectionFactory mcf)` Dissociate a managed connection from a logical connection.
    `void` | `returnManagedConnection(ConnectionListener cl, boolean kill)` Kill given connection listener wrapped connection instance.

    - ### Methods inherited from interface javax.resource.spi.ConnectionManager

      `allocateConnection`

    - ### Methods inherited from interface javax.resource.spi.LazyAssociatableConnectionManager

      `associateConnection, inactiveConnectionClosed`

    - ### Methods inherited from interface javax.resource.spi.LazyEnlistableConnectionManager

      `lazyEnlist`

- - ### Method Detail

    - #### associateManagedConnection

          javax.resource.spi.ManagedConnection associateManagedConnection(java.lang.Object connection,
                                                                          javax.resource.spi.ManagedConnectionFactory mcf,
                                                                          javax.resource.spi.ConnectionRequestInfo cri)
                                                                   throws javax.resource.ResourceException

      Associate a managed connection to a logical connection
      Parameters:
        `connection` - The connection
        `mcf` - The managed connection factory
        `cri` - The connection request information
      Returns:
        The managed connection
      Throws:
        `javax.resource.ResourceException` - Thrown if an error occurs

    - #### dissociateManagedConnection

          boolean dissociateManagedConnection(java.lang.Object connection,
                                              javax.resource.spi.ManagedConnection mc,
                                              javax.resource.spi.ManagedConnectionFactory mcf)
                                       throws javax.resource.ResourceException

      Dissociate a managed connection from a logical connection. The return value of this method will indicate if the managed connection has more connections attached (false), or if it was return to the pool (true). If the managed connection is return to the pool its `cleanup` method will be called
      Parameters:
        `connection` - The connection
        `mc` - The managed connection
        `mcf` - The managed connection factory
      Returns:
        True if the managed connection was freed; otherwise false
      Throws:
        `javax.resource.ResourceException` - Thrown if an error occurs

    - #### returnManagedConnection

          void returnManagedConnection(ConnectionListener cl,
                                       boolean kill)

      Kill given connection listener wrapped connection instance.
      Parameters:
        `cl` - connection listener that wraps connection
        `kill` - kill connection or not

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)