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

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

Direct Known Subclasses:
    NoTxConnectionManager, XATxConnectionManager, TxConnectionManager, LocalTxConnectionManager

The BaseConnectionManager2 is an abstract base class for JBoss ConnectionManager implementations. It includes 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.
Nested Class Summary:
abstract protected class  BaseConnectionManager2.BaseConnectionEventListener   
public static class  BaseConnectionManager2.ConnectionManagerProxy   
Field Summary
public static final  String STOPPING_NOTIFICATION     
protected  ObjectName managedConnectionPoolName     
protected  ManagedConnectionPool poolingStrategy     
protected  String jndiName     
protected  String securityDomainJndiName     
protected  SubjectFactory subjectFactory     
protected  ObjectName jaasSecurityManagerService     
protected  ObjectName ccmName     
protected  CachedConnectionManager ccm     
protected  boolean trace     
Fields inherited from org.jboss.system.ServiceMBeanSupport:
SERVICE_CONTROLLER_SIG,  log,  server,  serviceName
Constructor:
 public BaseConnectionManager2() 
 public BaseConnectionManager2(CachedConnectionManager ccm,
    ManagedConnectionPool poolingStrategy) 
    Creates a new BaseConnectionManager2 instance. for TESTING ONLY! not a managed operation.
    Parameters:
    ccm - a CachedConnectionManager value
    poolingStrategy - a ManagedConnectionPool value
Method from org.jboss.resource.connectionmanager.BaseConnectionManager2 Summary:
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.BaseConnectionManager2 Detail:
 public Object allocateConnection(ManagedConnectionFactory mcf,
    ConnectionRequestInfo cri) throws ResourceException 
 public  void checkTransactionActive() throws SystemException, RollbackException 
 public  void disconnect(Collection crs,
    Set unsharableResources) throws ResourceException 
 protected  void disconnectManagedConnection(ConnectionListener cl) 
    Invoked when a managed connection is no longer associated
 public ObjectName getCachedConnectionManager() 
 protected final CachedConnectionManager getCcm() 
 public int getConnectionCount() 
 public BaseConnectionManager2 getInstance() 
 public ObjectName getJaasSecurityManagerService() 
Deprecated!
 public String getJndiName() 
 public ConnectionListener getManagedConnection(Subject subject,
    ConnectionRequestInfo cri) throws ResourceException 
    Public for use in testing pooling functionality by itself. called by both allocateConnection and reconnect.
 protected ConnectionListener getManagedConnection(Transaction transaction,
    Subject subject,
    ConnectionRequestInfo cri) throws ResourceException 
    Get the managed connection from the pool
 public ManagedConnectionFactory getManagedConnectionFactory() 
 public ObjectName getManagedConnectionPool() 
 public MBeanNotificationInfo[] getNotificationInfo() 
 public ManagedConnectionPool getPoolingStrategy() 
    For testing
 public String getSecurityDomainJndiName() 
 public SubjectFactory getSubjectFactory() 
 public long getTimeLeftBeforeTransactionTimeout(boolean errorRollback) throws RollbackException 
 public TransactionManager getTransactionManagerInstance() 
 public int getTransactionTimeout() throws SystemException 
 public boolean isTransactional() 
 protected  void managedConnectionDisconnected(ConnectionListener cl) throws ResourceException 
    For polymorphism.

    Do not invoke directly use disconnectManagedConnection which does the relevent exception handling

 protected  void managedConnectionReconnected(ConnectionListener cl) throws ResourceException 
    For polymorphism.

    Do not invoke directly use reconnectManagedConnection which does the relevent exception handling

 public  void reconnect(Collection conns,
    Set unsharableResources) throws ResourceException 
 protected  void reconnectManagedConnection(ConnectionListener cl) throws ResourceException 
    Invoked to reassociate a managed connection
 protected static  void rethrowAsResourceException(String message,
    Throwable t) throws ResourceException 
Deprecated! use - JBossResourceException.rethrowAsResourceException

    Rethrow a throwable as resource exception
 public  void returnManagedConnection(ConnectionListener cl,
    boolean kill) 
 public  void setCachedConnectionManager(ObjectName ccmName) 
 public  void setJaasSecurityManagerService(ObjectName jaasSecurityManagerService) 
Deprecated! Maintained - for legacy

 public  void setJndiName(String jndiName) 
 public  void setManagedConnectionPool(ObjectName newManagedConnectionPool) 
 public  void setSecurityDomainJndiName(String securityDomainJndiName) 
 public  void setSubjectFactory(SubjectFactory subjectFactory) 
 protected  void startService() throws Exception 
 protected  void stopService() throws Exception 
 public  void transactionStarted(Collection conns) throws SystemException 
 protected  void unregisterAssociation(ConnectionListener cl,
    Object c) throws ResourceException