站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 connector API Documentation 英文版文档

XATxConnectionManager (JBoss Connector API) - JBoss 3.2.7 connector API Documentation 英文版文档


org.jboss.resource.connectionmanager
Class XATxConnectionManager

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.resource.connectionmanager.BaseConnectionManager2
              extended byorg.jboss.resource.connectionmanager.TxConnectionManager
                  extended byorg.jboss.resource.connectionmanager.XATxConnectionManager
All Implemented Interfaces:
BaseConnectionManager2MBean, ConnectionCacheListener, ConnectionListenerFactory, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean, TxConnectionManagerMBean, XATxConnectionManagerMBean

public class XATxConnectionManager
extends TxConnectionManager
implements XATxConnectionManagerMBean

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.

Version:
$Revision: 1.7.2.5 $
Author:
David Jencks, Adrian Brock

Nested Class Summary
 
Nested classes inherited from class org.jboss.resource.connectionmanager.TxConnectionManager
TxConnectionManager.TxConnectionEventListener
 
Nested classes inherited from class org.jboss.resource.connectionmanager.BaseConnectionManager2
BaseConnectionManager2.BaseConnectionEventListener, BaseConnectionManager2.ConnectionManagerProxy
 
Field Summary
 
Fields inherited from class org.jboss.resource.connectionmanager.BaseConnectionManager2
jndiName, poolingStrategy, STOPPING_NOTIFICATION, trace
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.resource.connectionmanager.XATxConnectionManagerMBean
OBJECT_NAME
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
XATxConnectionManager()
          Default managed XATxConnectionManager constructor for mbean instances.
XATxConnectionManager(CachedConnectionManager ccm, ManagedConnectionPool poolingStrategy, TransactionManager tm)
          Creates a new XATxConnectionManager instance.
 
Method Summary
 boolean isTrackConnectionByTx()
          mbean get-set pair for field trackConnectionByTx Get the value of trackConnectionByTx
 void setTrackConnectionByTx(boolean trackConnectionByTx)
          Set the value of trackConnectionByTx
 
Methods inherited from class org.jboss.resource.connectionmanager.TxConnectionManager
createConnectionListener, getManagedConnection, getTransactionManager, getTransactionManagerInstance, getTransactionManagerService, isLocalTransactions, isTransactional, managedConnectionDisconnected, managedConnectionReconnected, setLocalTransactions, setTransactionManager, setTransactionManagerInstance, setTransactionManagerService, startService, stopService, transactionStarted
 
Methods inherited from class org.jboss.resource.connectionmanager.BaseConnectionManager2
allocateConnection, disconnect, getCachedConnectionManager, getCcm, getConnectionCount, getInstance, getJaasSecurityManagerService, getJndiName, getManagedConnection, getManagedConnectionFactory, getManagedConnectionPool, getNotificationInfo, getPoolingStrategy, getSecurityDomainJndiName, reconnect, rethrowAsResourceException, returnManagedConnection, setCachedConnectionManager, setJaasSecurityManagerService, setJndiName, setManagedConnectionPool, setSecurityDomainJndiName, unregisterAssociation
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.resource.connectionmanager.TxConnectionManagerMBean
getTransactionManager, getTransactionManagerService, isLocalTransactions, setLocalTransactions, setTransactionManager, setTransactionManagerService
 
Methods inherited from interface org.jboss.resource.connectionmanager.BaseConnectionManager2MBean
getCachedConnectionManager, getInstance, getJaasSecurityManagerService, getJndiName, getManagedConnectionFactory, getManagedConnectionPool, getSecurityDomainJndiName, setCachedConnectionManager, setJaasSecurityManagerService, setJndiName, setManagedConnectionPool, setSecurityDomainJndiName
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Constructor Detail

XATxConnectionManager

public XATxConnectionManager()
Default managed XATxConnectionManager constructor for mbean instances.


XATxConnectionManager

public XATxConnectionManager(CachedConnectionManager ccm,
                             ManagedConnectionPool poolingStrategy,
                             TransactionManager tm)
Creates a new XATxConnectionManager instance. for TESTING ONLY!!! not a managed constructor!!

Parameters:
ccm - a CachedConnectionManager value
poolingStrategy - a ManagedConnectionPool value
tm - a TransactionManager value
Method Detail

isTrackConnectionByTx

public boolean isTrackConnectionByTx()
mbean get-set pair for field trackConnectionByTx Get the value of trackConnectionByTx

Specified by:
isTrackConnectionByTx in interface XATxConnectionManagerMBean
Overrides:
isTrackConnectionByTx in class TxConnectionManager
Returns:
value of trackConnectionByTx

setTrackConnectionByTx

public void setTrackConnectionByTx(boolean trackConnectionByTx)
Set the value of trackConnectionByTx

Specified by:
setTrackConnectionByTx in interface XATxConnectionManagerMBean
Overrides:
setTrackConnectionByTx in class TxConnectionManager
Parameters:
trackConnectionByTx - Value to assign to trackConnectionByTx


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