Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » resource » connectionmanager » [javadoc | source]
org.jboss.resource.connectionmanager
public class: XATxConnectionManager [javadoc | source]
java.lang.Object
   org.jboss.mx.util.JBossNotificationBroadcasterSupport
      org.jboss.system.ServiceMBeanSupport
         org.jboss.resource.connectionmanager.BaseConnectionManager2
            org.jboss.resource.connectionmanager.TxConnectionManager
               org.jboss.resource.connectionmanager.XATxConnectionManager

All Implemented Interfaces:
    XATxConnectionManagerMBean, TxConnectionManagerMBean, BaseConnectionManager2MBean, org.jboss.tm.TransactionTimeoutConfiguration, JTATransactionChecker, ConnectionListenerFactory, ConnectionCacheListener, org.jboss.kernel.spi.dependency.KernelControllerContextAware, ServiceMBean, MBeanRegistration, NotificationEmitter

The XATxConnectionManager connection manager has to perform the following operations: 1. When an application component requests a new ConnectionHandle, it must find a ManagedConnection, and make sure a ConnectionEventListener is registered. It must inform the CachedConnectionManager that a connection handle has been given out. It needs to count the number of handles for each ManagedConnection. If there is a current transaction, it must enlist the ManagedConnection's XAResource in the transaction. Entry point: ConnectionManager.allocateConnection. written. 2. When a ConnectionClosed event is received from the ConnectionEventListener, it must reduce the handle count. If the handle count is zero, the XAResource should be delisted from the Transaction, if any. The CachedConnectionManager must be notified that the connection is closed. Entry point: ConnectionEventListener.ConnectionClosed. written 3. When a transaction begun notification is received from the UserTransaction (via the CachedConnectionManager, all managedConnections associated with the current object must be enlisted in the transaction. Entry point: (from CachedConnectionManager) ConnectionCacheListener.transactionStarted(Transaction, Collection). The collection is of ConnectionRecord objects. written. 4. When a synchronization beforeCompletion event is received, any enlisted XAResources must be delisted. Entry point: Synchronization.beforeCompletion() (implemented in XAConnectionEventListener)) written. 5. When an "entering object" notification is received from the CachedConnectionInterceptor, all the connections for the current object must be associated with a ManagedConnection. if there is a Transaction, the XAResource must be enlisted with it. Entry point: ConnectionCacheListener.reconnect(Collection conns) The Collection is of ConnectionRecord objects. written. 6. When a "leaving object" notification is received from the CachedConnectionInterceptor, all the managedConnections for the current object must have their XAResources delisted from the current Transaction, if any, and cleanup called on each ManagedConnection. Entry point: ConnectionCacheListener.disconnect(Collection conns). written. In addition it inherits behavior from BaseConnectionManager2, including functionality to obtain managed connections from a ManagedConnectionPool mbean, find the Subject from a SubjectSecurityDomain, and interact with the CachedConnectionManager for connections held over transaction and method boundaries. Important mbean references are to a ManagedConnectionPool supplier (typically a JBossManagedConnectionPool), and a RARDeployment representing the ManagedConnectionFactory.
Fields inherited from org.jboss.resource.connectionmanager.BaseConnectionManager2:
STOPPING_NOTIFICATION,  managedConnectionPoolName,  poolingStrategy,  jndiName,  securityDomainJndiName,  subjectFactory,  jaasSecurityManagerService,  ccmName,  ccm,  trace
Fields inherited from org.jboss.system.ServiceMBeanSupport:
SERVICE_CONTROLLER_SIG,  log,  server,  serviceName
Constructor:
 public XATxConnectionManager() 
 public XATxConnectionManager(CachedConnectionManager ccm,
    ManagedConnectionPool poolingStrategy,
    TransactionManager tm) 
    Creates a new XATxConnectionManager instance. for TESTING ONLY!!! not a managed constructor!!
    Parameters:
    mcf - a ManagedConnectionFactory value
    ccm - a CachedConnectionManager value
    poolingStrategy - a ManagedConnectionPool value
    tm - a TransactionManager value
Method from org.jboss.resource.connectionmanager.XATxConnectionManager Summary:
isTrackConnectionByTx,   setTrackConnectionByTx
Methods from org.jboss.resource.connectionmanager.TxConnectionManager:
checkTransactionActive,   createConnectionListener,   getIsSameRMOverrideValue,   getManagedConnection,   getPadXid,   getTimeLeftBeforeTransactionTimeout,   getTransactionManager,   getTransactionManagerInstance,   getTransactionManagerService,   getWrapXAResource,   getXAResourceTransactionTimeout,   isLocalTransactions,   isTrackConnectionByTx,   isTransactional,   managedConnectionDisconnected,   managedConnectionReconnected,   rethrowAsSystemException,   setIsSameRMOverrideValue,   setLocalTransactions,   setPadXid,   setTrackConnectionByTx,   setTransactionManager,   setTransactionManagerInstance,   setTransactionManagerService,   setWrapXAResource,   setXAResourceTransactionTimeout,   startService,   stopService,   transactionStarted
Methods from org.jboss.resource.connectionmanager.BaseConnectionManager2:
allocateConnection,   checkTransactionActive,   disconnect,   disconnectManagedConnection,   getCachedConnectionManager,   getCcm,   getConnectionCount,   getInstance,   getJaasSecurityManagerService,   getJndiName,   getManagedConnection,   getManagedConnection,   getManagedConnectionFactory,   getManagedConnectionPool,   getNotificationInfo,   getPoolingStrategy,   getSecurityDomainJndiName,   getSubjectFactory,   getTimeLeftBeforeTransactionTimeout,   getTransactionManagerInstance,   getTransactionTimeout,   isTransactional,   managedConnectionDisconnected,   managedConnectionReconnected,   reconnect,   reconnectManagedConnection,   rethrowAsResourceException,   returnManagedConnection,   setCachedConnectionManager,   setJaasSecurityManagerService,   setJndiName,   setManagedConnectionPool,   setSecurityDomainJndiName,   setSubjectFactory,   startService,   stopService,   transactionStarted,   unregisterAssociation
Methods from org.jboss.system.ServiceMBeanSupport:
create,   createService,   destroy,   destroyService,   getDeploymentInfo,   getLog,   getName,   getNextNotificationSequenceNumber,   getObjectName,   getServer,   getServiceName,   getState,   getStateString,   jbossInternalCreate,   jbossInternalDescription,   jbossInternalDestroy,   jbossInternalLifecycle,   jbossInternalStart,   jbossInternalStop,   pojoChange,   pojoCreate,   pojoDestroy,   pojoStart,   pojoStop,   postDeregister,   postRegister,   preDeregister,   preRegister,   setKernelControllerContext,   start,   startService,   stop,   stopService,   unsetKernelControllerContext
Methods from org.jboss.mx.util.JBossNotificationBroadcasterSupport:
addNotificationListener,   getNotificationInfo,   handleNotification,   nextNotificationSequenceNumber,   removeNotificationListener,   removeNotificationListener,   sendNotification
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.resource.connectionmanager.XATxConnectionManager Detail:
 public boolean isTrackConnectionByTx() 
    mbean get-set pair for field trackConnectionByTx Get the value of trackConnectionByTx
 public  void setTrackConnectionByTx(boolean trackConnectionByTx) 
    Set the value of trackConnectionByTx