|
||||||||||
| PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
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 (src)
|
static class |
BaseConnectionManager2.ConnectionManagerProxy (src)
|
| Field Summary | |
protected java.lang.String |
jndiName
|
protected ManagedConnectionPool (src) |
poolingStrategy
|
static java.lang.String |
STOPPING_NOTIFICATION
|
protected boolean |
trace
|
| Fields inherited from class org.jboss.system.ServiceMBeanSupport (src) |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
| Fields inherited from interface org.jboss.system.ServiceMBean (src) |
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 (src) ccm,
ManagedConnectionPool (src) poolingStrategy)
Creates a new BaseConnectionManager2 instance. |
|
| Method Summary | |
java.lang.Object |
allocateConnection(ManagedConnectionFactory (src) mcf,
ConnectionRequestInfo (src) cri)
|
void |
disconnect(java.util.Collection crs,
java.util.Set unsharableResources)
|
protected void |
disconnectManagedConnection(ConnectionListener (src) cl)
Invoked when a managed connection is no longer associated |
ObjectName (src) |
getCachedConnectionManager()
Describe getCachedConnectionManager method here. |
protected CachedConnectionManager (src) |
getCcm()
|
int |
getConnectionCount()
|
BaseConnectionManager2 (src) |
getInstance()
Describe getInstance method here. |
ObjectName (src) |
getJaasSecurityManagerService()
Get the JaasSecurityManagerService value. |
java.lang.String |
getJndiName()
The JndiName attribute holds the jndi name the ConnectionFactory will be bound under in jndi. |
ConnectionListener (src) |
getManagedConnection(javax.security.auth.Subject subject,
ConnectionRequestInfo (src) cri)
Describe getManagedConnection method here. |
protected ConnectionListener (src) |
getManagedConnection(Transaction (src) transaction,
javax.security.auth.Subject subject,
ConnectionRequestInfo (src) cri)
Get the managed connection from the pool |
ManagedConnectionFactory (src) |
getManagedConnectionFactory()
ManagedConnectionFactory is an internal attribute that holds the ManagedConnectionFactory instance managed by this ConnectionManager. |
ObjectName (src) |
getManagedConnectionPool()
The ManagedConnectionPool holds the ObjectName of the mbean representing the pool for this connection manager. |
MBeanNotificationInfo (src) [] |
getNotificationInfo()
Returns the notification metadata associated with the MBean. |
ManagedConnectionPool (src) |
getPoolingStrategy()
For testing |
java.lang.String |
getSecurityDomainJndiName()
Get the SecurityDomainJndiName value. |
TransactionManager (src) |
getTransactionManagerInstance()
Get the transaction manager |
boolean |
isTransactional()
Determine whether is a transaction |
protected void |
managedConnectionDisconnected(ConnectionListener (src) cl)
For polymorphism. |
protected void |
managedConnectionReconnected(ConnectionListener (src) cl)
For polymorphism. |
void |
reconnect(java.util.Collection conns,
java.util.Set unsharableResources)
Describe reconnect method here. |
protected void |
reconnectManagedConnection(ConnectionListener (src) cl)
Invoked to reassociate a managed connection |
protected static void |
rethrowAsResourceException(java.lang.String message,
java.lang.Throwable t)
Rethrow a throwable as resource exception |
void |
returnManagedConnection(ConnectionListener (src) cl,
boolean kill)
|
void |
setCachedConnectionManager(ObjectName (src) ccmName)
The CachecConnectionManager holds the ObjectName of the CachedConnectionManager mbean used by this ConnectionManager. |
void |
setJaasSecurityManagerService(ObjectName (src) jaasSecurityManagerService)
Set the JaasSecurityManagerService value. |
void |
setJndiName(java.lang.String jndiName)
Set the JndiName value. |
void |
setManagedConnectionPool(ObjectName (src) newManagedConnectionPool)
Set the ManagedConnectionPool value. |
void |
setSecurityDomainJndiName(java.lang.String securityDomainJndiName)
The SecurityDomainJndiName holds the jndi name of the security domain configured for the ManagedConnectionFactory this ConnectionManager manages. |
protected void |
startService()
Sub-classes should override this method to provide custum 'start' logic. |
protected void |
stopService()
Sub-classes should override this method to provide custum 'stop' logic. |
void |
transactionStarted(java.util.Collection conns)
|
protected void |
unregisterAssociation(ConnectionListener (src) cl,
java.lang.Object c)
|
| Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
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 (src) |
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.ConnectionListenerFactory (src) |
createConnectionListener |
| Field Detail |
public static final java.lang.String STOPPING_NOTIFICATION
protected ManagedConnectionPool (src) poolingStrategy
protected java.lang.String jndiName
protected boolean trace
| Constructor Detail |
public BaseConnectionManager2()
public BaseConnectionManager2(CachedConnectionManager (src) ccm,
ManagedConnectionPool (src) poolingStrategy)
BaseConnectionManager2 instance.
for TESTING ONLY! not a managed operation.
ccm - a CachedConnectionManager valuepoolingStrategy - a ManagedConnectionPool value| Method Detail |
protected static void rethrowAsResourceException(java.lang.String message,
java.lang.Throwable t)
throws ResourceException (src)
ResourceException (src) public ManagedConnectionPool (src) getPoolingStrategy()
public java.lang.String getJndiName()
public void setJndiName(java.lang.String jndiName)
jndiName - The JndiName value.public ObjectName (src) getManagedConnectionPool()
public void setManagedConnectionPool(ObjectName (src) newManagedConnectionPool)
newManagedConnectionPool - The new ManagedConnectionPool value.public void setCachedConnectionManager(ObjectName (src) ccmName)
ccmName - an ObjectName valuepublic ObjectName (src) getCachedConnectionManager()
getCachedConnectionManager method here.
ObjectName valuepublic void setSecurityDomainJndiName(java.lang.String securityDomainJndiName)
securityDomainJndiName - an String valuepublic java.lang.String getSecurityDomainJndiName()
public ObjectName (src) getJaasSecurityManagerService()
public void setJaasSecurityManagerService(ObjectName (src) jaasSecurityManagerService)
jaasSecurityManagerService - The new JaasSecurityManagerService value.public ManagedConnectionFactory (src) getManagedConnectionFactory()
public BaseConnectionManager2 (src) getInstance()
getInstance method here.
BaseConnectionManager2 value
protected void startService()
throws java.lang.Exception
ServiceMBeanSupport (src) This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
startService in class ServiceMBeanSupport (src) java.lang.Exception
protected void stopService()
throws java.lang.Exception
ServiceMBeanSupport (src) This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
stopService in class ServiceMBeanSupport (src) java.lang.Exception
public ConnectionListener (src) getManagedConnection(javax.security.auth.Subject subject,
ConnectionRequestInfo (src) cri)
throws ResourceException (src)
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
ResourceException (src) - if an error occurs
protected ConnectionListener (src) getManagedConnection(Transaction (src) transaction,
javax.security.auth.Subject subject,
ConnectionRequestInfo (src) cri)
throws ResourceException (src)
transaction - the transaction for track by transactionsubject - the subjectcri - the ConnectionRequestInfo
ResourceException (src) - if an error occurs
public void returnManagedConnection(ConnectionListener (src) cl,
boolean kill)
public int getConnectionCount()
public java.lang.Object allocateConnection(ManagedConnectionFactory (src) mcf,
ConnectionRequestInfo (src) cri)
throws ResourceException (src)
mcf - cri - ResourceException (src) -
public void transactionStarted(java.util.Collection conns)
throws SystemException (src)
transactionStarted in interface ConnectionCacheListener (src) SystemException (src)
public void reconnect(java.util.Collection conns,
java.util.Set unsharableResources)
throws ResourceException (src)
reconnect method here.
reconnect in interface ConnectionCacheListener (src) conns - a Collection value
ResourceException (src) - if an error occurs
public void disconnect(java.util.Collection crs,
java.util.Set unsharableResources)
throws ResourceException (src)
disconnect in interface ConnectionCacheListener (src) ResourceException (src) public MBeanNotificationInfo (src) [] getNotificationInfo()
NotificationBroadcaster (src)
getNotificationInfo in interface NotificationBroadcaster (src) getNotificationInfo in class JBossNotificationBroadcasterSupport (src)
protected void unregisterAssociation(ConnectionListener (src) cl,
java.lang.Object c)
throws ResourceException (src)
ResourceException (src) protected final CachedConnectionManager (src) getCcm()
protected void reconnectManagedConnection(ConnectionListener (src) cl)
throws ResourceException (src)
cl - the managed connection
ResourceException (src) protected void disconnectManagedConnection(ConnectionListener (src) cl)
cl - the managed connection
protected void managedConnectionReconnected(ConnectionListener (src) cl)
throws ResourceException (src)
Do not invoke directly use reconnectManagedConnection which does the relevent exception handling
ResourceException (src)
protected void managedConnectionDisconnected(ConnectionListener (src) cl)
throws ResourceException (src)
Do not invoke directly use disconnectManagedConnection which does the relevent exception handling
ResourceException (src) public boolean isTransactional()
ConnectionListenerFactory (src)
isTransactional in interface ConnectionListenerFactory (src) public TransactionManager (src) getTransactionManagerInstance()
ConnectionListenerFactory (src)
getTransactionManagerInstance in interface ConnectionListenerFactory (src)
|
||||||||||
| PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||