org.jboss.resource.connectionmanager
Class CachedConnectionManager

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.resource.connectionmanager.CachedConnectionManager
All Implemented Interfaces:
EventListener, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, CachedConnectionManagerMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean, org.jboss.tm.usertx.client.ServerVMClientUserTransaction.UserTransactionStartedListener

public class CachedConnectionManager
extends org.jboss.system.ServiceMBeanSupport
implements org.jboss.tm.usertx.client.ServerVMClientUserTransaction.UserTransactionStartedListener, CachedConnectionManagerMBean

The CachedConnectionManager mbean manages associations between meta-aware objects (those accessed through interceptor chains) and connection handles, and between user transactions and connection handles. Normally there should only be one such mbean. It is called by CachedConnectionInterceptor, UserTransaction, and all BaseConnectionManager2 instances.

Version:
$Revision: 1.31.2.9 $
Author:
David Jencks, Erwin Guib, Adrian Brock

Field Summary
protected  boolean error
           
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.CachedConnectionManagerMBean
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
CachedConnectionManager()
          Default CachedConnectionManager managed constructor for mbeans.
 
Method Summary
 CachedConnectionManager getInstance()
          The Instance attribute simply holds the current instance, which is normally the only instance of CachedConnectionManager.
 int getInUseConnections()
          Get the inuse connections
 javax.management.ObjectName getTransactionManagerServiceName()
          Get the TransactionManagerServiceName value.
 boolean isDebug()
          Get the debug value.
 boolean isError()
          Get the error value.
 boolean isSpecCompliant()
          Get the SpecCompliant value.
 Map listInUseConnections()
          List the inuse connections
 void popMetaAwareObject(Set unsharableResources)
          Describe popMetaAwareObject method here.
 void pushMetaAwareObject(Object rawKey, Set unsharableResources)
          Describe pushMetaAwareObject method here.
 void setDebug(boolean value)
          Set the Debug value.
 void setError(boolean value)
          Set the error value.
 void setSpecCompliant(boolean specCompliant)
          Set the SpecCompliant value.
 void setTransactionManagerServiceName(javax.management.ObjectName transactionManagerServiceName)
          Set the TransactionManagerServiceName value.
protected  void startService()
           
protected  void stopService()
           
 void userTransactionStarted()
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getDeploymentInfo, 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, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, 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
 

Field Detail

trace

protected boolean trace

error

protected boolean error
Constructor Detail

CachedConnectionManager

public CachedConnectionManager()
Default CachedConnectionManager managed constructor for mbeans. Remember that this mbean should be a singleton.

Method Detail

isSpecCompliant

public boolean isSpecCompliant()
Description copied from interface: CachedConnectionManagerMBean
Get the SpecCompliant value.

Specified by:
isSpecCompliant in interface CachedConnectionManagerMBean
Returns:
the SpecCompliant value.

setSpecCompliant

public void setSpecCompliant(boolean specCompliant)
Description copied from interface: CachedConnectionManagerMBean
Set the SpecCompliant value.

Specified by:
setSpecCompliant in interface CachedConnectionManagerMBean
Parameters:
specCompliant - The new SpecCompliant value.

isDebug

public boolean isDebug()
Description copied from interface: CachedConnectionManagerMBean
Get the debug value.

Specified by:
isDebug in interface CachedConnectionManagerMBean
Returns:
the debug value.

setDebug

public void setDebug(boolean value)
Description copied from interface: CachedConnectionManagerMBean
Set the Debug value.

Specified by:
setDebug in interface CachedConnectionManagerMBean
Parameters:
value - The new debug value.

isError

public boolean isError()
Description copied from interface: CachedConnectionManagerMBean
Get the error value.

Specified by:
isError in interface CachedConnectionManagerMBean
Returns:
the error value.

setError

public void setError(boolean value)
Description copied from interface: CachedConnectionManagerMBean
Set the error value.

Specified by:
setError in interface CachedConnectionManagerMBean
Parameters:
value - The new error value.

getTransactionManagerServiceName

public javax.management.ObjectName getTransactionManagerServiceName()
Description copied from interface: CachedConnectionManagerMBean
Get the TransactionManagerServiceName value.

Specified by:
getTransactionManagerServiceName in interface CachedConnectionManagerMBean
Returns:
the TransactionManagerServiceName value.

setTransactionManagerServiceName

public void setTransactionManagerServiceName(javax.management.ObjectName transactionManagerServiceName)
Description copied from interface: CachedConnectionManagerMBean
Set the TransactionManagerServiceName value.

Specified by:
setTransactionManagerServiceName in interface CachedConnectionManagerMBean
Parameters:
transactionManagerServiceName - The new TransactionManagerServiceName value.

getInstance

public CachedConnectionManager getInstance()
Description copied from interface: CachedConnectionManagerMBean
The Instance attribute simply holds the current instance, which is normally the only instance of CachedConnectionManager.

Specified by:
getInstance in interface CachedConnectionManagerMBean
Returns:
a CachedConnectionManager value

getInUseConnections

public int getInUseConnections()
Description copied from interface: CachedConnectionManagerMBean
Get the inuse connections

Specified by:
getInUseConnections in interface CachedConnectionManagerMBean
Returns:
the number of inuse connections

listInUseConnections

public Map listInUseConnections()
Description copied from interface: CachedConnectionManagerMBean
List the inuse connections

Specified by:
listInUseConnections in interface CachedConnectionManagerMBean
Returns:
a map of connections to allocation stack traces

startService

protected void startService()
                     throws Exception
Overrides:
startService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

stopService

protected void stopService()
                    throws Exception
Overrides:
stopService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

pushMetaAwareObject

public void pushMetaAwareObject(Object rawKey,
                                Set unsharableResources)
                         throws javax.resource.ResourceException
Describe pushMetaAwareObject method here. PUBLIC for TESTING PURPOSES ONLY!

Parameters:
rawKey - an Object value
unsharableResources - the unsharable resources
Throws:
javax.resource.ResourceException - if an error occurs

popMetaAwareObject

public void popMetaAwareObject(Set unsharableResources)
                        throws javax.resource.ResourceException
Describe popMetaAwareObject method here. PUBLIC for TESTING PURPOSES ONLY!

Throws:
javax.resource.ResourceException - if an error occurs

userTransactionStarted

public void userTransactionStarted()
                            throws SystemException
Specified by:
userTransactionStarted in interface org.jboss.tm.usertx.client.ServerVMClientUserTransaction.UserTransactionStartedListener
Throws:
SystemException


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