|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport org.jboss.system.ServiceMBeanSupport org.jboss.resource.connectionmanager.BaseConnectionManager2
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 | |
protected class |
BaseConnectionManager2.BaseConnectionEventListener
|
static class |
BaseConnectionManager2.ConnectionManagerProxy
|
Field Summary | |
protected String |
jndiName
|
protected ManagedConnectionPool |
poolingStrategy
|
static String |
STOPPING_NOTIFICATION
|
protected boolean |
trace
|
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.resource.connectionmanager.BaseConnectionManager2MBean |
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 | |
BaseConnectionManager2()
Default BaseConnectionManager2 managed constructor for use by subclass mbeans. |
|
BaseConnectionManager2(CachedConnectionManager ccm,
ManagedConnectionPool poolingStrategy)
Creates a new BaseConnectionManager2 instance. |
Method Summary | |
Object |
allocateConnection(javax.resource.spi.ManagedConnectionFactory mcf,
javax.resource.spi.ConnectionRequestInfo cri)
|
void |
disconnect(Collection crs,
Set unsharableResources)
|
javax.management.ObjectName |
getCachedConnectionManager()
Describe getCachedConnectionManager method here. |
protected CachedConnectionManager |
getCcm()
|
int |
getConnectionCount()
|
BaseConnectionManager2 |
getInstance()
Describe getInstance method here. |
javax.management.ObjectName |
getJaasSecurityManagerService()
Get the JaasSecurityManagerService value. |
String |
getJndiName()
The JndiName attribute holds the jndi name the ConnectionFactory will be bound under in jndi. |
ConnectionListener |
getManagedConnection(Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
Describe getManagedConnection method here. |
protected ConnectionListener |
getManagedConnection(Transaction transaction,
Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
Get the managed connection from the pool |
javax.resource.spi.ManagedConnectionFactory |
getManagedConnectionFactory()
ManagedConnectionFactory is an internal attribute that holds the ManagedConnectionFactory instance managed by this ConnectionManager. |
javax.management.ObjectName |
getManagedConnectionPool()
The ManagedConnectionPool holds the ObjectName of the mbean representing the pool for this connection manager. |
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
|
ManagedConnectionPool |
getPoolingStrategy()
For testing |
String |
getSecurityDomainJndiName()
Get the SecurityDomainJndiName value. |
TransactionManager |
getTransactionManagerInstance()
Get the transaction manager |
boolean |
isTransactional()
Determine whether is a transaction |
protected void |
managedConnectionDisconnected(ConnectionListener cl)
|
protected void |
managedConnectionReconnected(ConnectionListener cl)
|
void |
reconnect(Collection conns,
Set unsharableResources)
Describe reconnect method here. |
protected static void |
rethrowAsResourceException(String message,
Throwable t)
Rethrow a throwable as resource exception |
void |
returnManagedConnection(ConnectionListener cl,
boolean kill)
|
void |
setCachedConnectionManager(javax.management.ObjectName ccmName)
The CachecConnectionManager holds the ObjectName of the CachedConnectionManager mbean used by this ConnectionManager. |
void |
setJaasSecurityManagerService(javax.management.ObjectName jaasSecurityManagerService)
Set the JaasSecurityManagerService value. |
void |
setJndiName(String jndiName)
Set the JndiName value. |
void |
setManagedConnectionPool(javax.management.ObjectName newManagedConnectionPool)
Set the ManagedConnectionPool value. |
void |
setSecurityDomainJndiName(String securityDomainJndiName)
The SecurityDomainJndiName holds the jndi name of the security domain configured for the ManagedConnectionFactory this ConnectionManager manages. |
protected void |
startService()
|
protected void |
stopService()
|
void |
transactionStarted(Collection conns)
|
protected void |
unregisterAssociation(ConnectionListener cl,
Object c)
|
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.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
Methods inherited from interface org.jboss.resource.connectionmanager.ConnectionListenerFactory |
createConnectionListener |
Field Detail |
public static final String STOPPING_NOTIFICATION
protected ManagedConnectionPool poolingStrategy
protected String jndiName
protected boolean trace
Constructor Detail |
public BaseConnectionManager2()
public BaseConnectionManager2(CachedConnectionManager ccm, ManagedConnectionPool poolingStrategy)
BaseConnectionManager2
instance.
for TESTING ONLY! not a managed operation.
ccm
- a CachedConnectionManager
valuepoolingStrategy
- a ManagedConnectionPool
valueMethod Detail |
protected static void rethrowAsResourceException(String message, Throwable t) throws javax.resource.ResourceException
javax.resource.ResourceException
public ManagedConnectionPool getPoolingStrategy()
public String getJndiName()
getJndiName
in interface BaseConnectionManager2MBean
public void setJndiName(String jndiName)
setJndiName
in interface BaseConnectionManager2MBean
jndiName
- The JndiName value.public javax.management.ObjectName getManagedConnectionPool()
getManagedConnectionPool
in interface BaseConnectionManager2MBean
public void setManagedConnectionPool(javax.management.ObjectName newManagedConnectionPool)
setManagedConnectionPool
in interface BaseConnectionManager2MBean
newManagedConnectionPool
- The new ManagedConnectionPool value.public void setCachedConnectionManager(javax.management.ObjectName ccmName)
setCachedConnectionManager
in interface BaseConnectionManager2MBean
ccmName
- an ObjectName
valuepublic javax.management.ObjectName getCachedConnectionManager()
getCachedConnectionManager
method here.
getCachedConnectionManager
in interface BaseConnectionManager2MBean
ObjectName
valuepublic void setSecurityDomainJndiName(String securityDomainJndiName)
setSecurityDomainJndiName
in interface BaseConnectionManager2MBean
securityDomainJndiName
- an String
valuepublic String getSecurityDomainJndiName()
getSecurityDomainJndiName
in interface BaseConnectionManager2MBean
public javax.management.ObjectName getJaasSecurityManagerService()
getJaasSecurityManagerService
in interface BaseConnectionManager2MBean
public void setJaasSecurityManagerService(javax.management.ObjectName jaasSecurityManagerService)
setJaasSecurityManagerService
in interface BaseConnectionManager2MBean
jaasSecurityManagerService
- The new JaasSecurityManagerService value.public javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory()
getManagedConnectionFactory
in interface BaseConnectionManager2MBean
public BaseConnectionManager2 getInstance()
getInstance
method here.
getInstance
in interface BaseConnectionManager2MBean
BaseConnectionManager2
valueprotected void startService() throws Exception
Exception
protected void stopService() throws Exception
Exception
public ConnectionListener getManagedConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
getManagedConnection
method here.
Public for use in testing pooling functionality by itself.
called by both allocateConnection and reconnect.
subject
- a Subject
valuecri
- a ConnectionRequestInfo
value
ManagedConnection
value
javax.resource.ResourceException
- if an error occursprotected ConnectionListener getManagedConnection(Transaction transaction, Subject subject, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
transaction
- the transaction for track by transactionsubject
- the subjectcri
- the ConnectionRequestInfo
javax.resource.ResourceException
- if an error occurspublic void returnManagedConnection(ConnectionListener cl, boolean kill)
public int getConnectionCount()
public Object allocateConnection(javax.resource.spi.ManagedConnectionFactory mcf, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
mcf
- cri
- javax.resource.ResourceException
- public void transactionStarted(Collection conns) throws SystemException
transactionStarted
in interface ConnectionCacheListener
SystemException
public void reconnect(Collection conns, Set unsharableResources) throws javax.resource.ResourceException
reconnect
method here.
reconnect
in interface ConnectionCacheListener
conns
- a Collection
value
javax.resource.ResourceException
- if an error occurspublic void disconnect(Collection crs, Set unsharableResources) throws javax.resource.ResourceException
disconnect
in interface ConnectionCacheListener
javax.resource.ResourceException
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface javax.management.NotificationBroadcaster
protected void unregisterAssociation(ConnectionListener cl, Object c) throws javax.resource.ResourceException
javax.resource.ResourceException
protected final CachedConnectionManager getCcm()
protected void managedConnectionReconnected(ConnectionListener cl) throws javax.resource.ResourceException
javax.resource.ResourceException
protected void managedConnectionDisconnected(ConnectionListener cl) throws javax.resource.ResourceException
javax.resource.ResourceException
public boolean isTransactional()
ConnectionListenerFactory
isTransactional
in interface ConnectionListenerFactory
public TransactionManager getTransactionManagerInstance()
ConnectionListenerFactory
getTransactionManagerInstance
in interface ConnectionListenerFactory
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |