org.jboss.jca.core.connectionmanager

## Interface ConnectionManager

- All Superinterfaces:
    org.jboss.jca.core.api.connectionmanager.listener.ConnectionCacheListener, javax.resource.spi.ConnectionManager, org.jboss.jca.core.spi.graceful.GracefulShutdown, javax.resource.spi.LazyAssociatableConnectionManager, javax.resource.spi.LazyEnlistableConnectionManager, java.io.Serializable
  All Known Subinterfaces:
    NoTxConnectionManager, TxConnectionManager
  All Known Implementing Classes:
    NoTxConnectionManagerImpl, TxConnectionManagerImpl

      public interface ConnectionManager
      extends org.jboss.jca.core.api.connectionmanager.ConnectionManager, ConnectionCacheListener, org.jboss.jca.core.spi.graceful.GracefulShutdown

  Internal connection manager contract.

  - Responsible for managing cached connections over transactional components via `ConnectionCacheListener`
  - Responsible for managing connection instances using event listener
  Author:
    Gurkan Erdogdu, Jesper Pedersen

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `ConnectionListener` | `createConnectionListener(javax.resource.spi.ManagedConnection managedConnection, ManagedConnectionPool mcp)` Create a managed connection listener for the managed connection.
    `int` | `getAllocationRetry()` Get the number of allocation retries
    `long` | `getAllocationRetryWaitMillis()` Get the wait time between each allocation retry
    `org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager` | `getCachedConnectionManager()` Gets cached connection manager
    `java.lang.String` | `getJndiName()` Get the JNDI name
    `Pool` | `getPool()` Get the pool.
    `java.lang.String` | `getSecurityDomain()` Get the security domain.
    `org.jboss.jca.core.spi.security.SubjectFactory` | `getSubjectFactory()` Get the subject factory
    `org.jboss.jca.core.spi.transaction.TransactionIntegration` | `getTransactionIntegration()` Get the transaction integration.
    `boolean` | `isEnlistment()` Is enlistment
    `boolean` | `isSharable()` Is sharable
    `boolean` | `isTransactional()` Determine whether there connection is a transactional.
    `void` | `setJndiName(java.lang.String value)` Set the JNDI name
    `void` | `unregisterAssociation(ConnectionListener cl, java.lang.Object c)` Unregister association.

    - ### Methods inherited from interface org.jboss.jca.core.api.connectionmanager.ConnectionManager

      `associateManagedConnection, dissociateManagedConnection, returnManagedConnection`

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

    - ### Methods inherited from interface org.jboss.jca.core.connectionmanager.listener.ConnectionCacheListener

      `transactionStarted`

    - ### Methods inherited from interface org.jboss.jca.core.spi.graceful.GracefulShutdown

      `cancelShutdown, getDelay, isShutdown, prepareShutdown, prepareShutdown, prepareShutdown, prepareShutdown, shutdown`

- - ### Method Detail

    - #### getPool

          Pool getPool()

      Get the pool.
      Returns:
        the pool

    - #### getCachedConnectionManager

          org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager getCachedConnectionManager()

      Gets cached connection manager
      Returns:
        The cached connection manager

    - #### getAllocationRetry

          int getAllocationRetry()

      Get the number of allocation retries
      Returns:
        The number of retries

    - #### getAllocationRetryWaitMillis

          long getAllocationRetryWaitMillis()

      Get the wait time between each allocation retry
      Returns:
        The millis

    - #### getJndiName

          java.lang.String getJndiName()

      Get the JNDI name
      Returns:
        The value

    - #### setJndiName

          void setJndiName(java.lang.String value)

      Set the JNDI name
      Parameters:
        `value` - The value

    - #### getSecurityDomain

          java.lang.String getSecurityDomain()

      Get the security domain.
      Returns:
        The value

    - #### getSubjectFactory

          org.jboss.jca.core.spi.security.SubjectFactory getSubjectFactory()

      Get the subject factory
      Returns:
        The value

    - #### unregisterAssociation

          void unregisterAssociation(ConnectionListener cl,
                                     java.lang.Object c)

      Unregister association.
      Parameters:
        `cl` - connection listener
        `c` - connection

    - #### createConnectionListener

          ConnectionListener createConnectionListener(javax.resource.spi.ManagedConnection managedConnection,
                                                      ManagedConnectionPool mcp)
                                               throws javax.resource.ResourceException

      Create a managed connection listener for the managed connection.
      Parameters:
        `managedConnection` - the managed connection
        `mcp` - the managed connection pool
      Returns:
        a new connection event listener
      Throws:
        `javax.resource.ResourceException` - for any error

    - #### isTransactional

          boolean isTransactional()

      Determine whether there connection is a transactional.
      Returns:
        whether it is a transactional or not

    - #### getTransactionIntegration

          org.jboss.jca.core.spi.transaction.TransactionIntegration getTransactionIntegration()

      Get the transaction integration.
      Returns:
        the transaction integration

    - #### isSharable

          boolean isSharable()

      Is sharable
      Returns:
        The value

    - #### isEnlistment

          boolean isEnlistment()

      Is enlistment
      Returns:
        The value

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