Class DefaultTransactionMonitor
- java.lang.Object
-
- org.nuxeo.ecm.core.management.jtajca.internal.DefaultTransactionMonitor
-
- All Implemented Interfaces:
EventListener
,javax.transaction.Synchronization
,org.apache.geronimo.transaction.manager.TransactionManagerMonitor
,Monitor
,TransactionMonitor
public class DefaultTransactionMonitor extends Object implements org.apache.geronimo.transaction.manager.TransactionManagerMonitor, TransactionMonitor, javax.transaction.Synchronization
- Author:
- matic
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Object,DefaultTransactionStatistics>
activeStatistics
protected boolean
enabled
protected TransactionStatistics
lastCommittedStatistics
protected TransactionStatistics
lastRollbackedStatistics
protected static Log
log
protected DefaultMonitorComponent.ServerInstance
self
protected org.apache.geronimo.transaction.manager.TransactionManagerImpl
tm
-
Fields inherited from interface org.nuxeo.ecm.core.management.jtajca.TransactionMonitor
NAME
-
-
Constructor Summary
Constructors Constructor Description DefaultTransactionMonitor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterCompletion(int code)
void
beforeCompletion()
protected void
bindManagementInterface()
long
getActiveCount()
List<TransactionStatistics>
getActiveStatistics()
boolean
getEnabled()
TransactionStatistics
getLastCommittedStatistics()
TransactionStatistics
getLastRollbackedStatistics()
long
getTotalCommits()
long
getTotalRollbacks()
static String
id(Object key)
static String
id(javax.transaction.Transaction tx)
void
install()
protected org.apache.geronimo.transaction.manager.TransactionManagerImpl
lookup()
protected DefaultTransactionStatistics
thisStatistics()
void
threadAssociated(javax.transaction.Transaction tx)
void
threadUnassociated(javax.transaction.Transaction tx)
boolean
toggle()
protected void
unbindManagementInterface()
void
uninstall()
-
-
-
Field Detail
-
log
protected static final Log log
-
tm
protected org.apache.geronimo.transaction.manager.TransactionManagerImpl tm
-
enabled
protected boolean enabled
-
self
protected DefaultMonitorComponent.ServerInstance self
-
lastCommittedStatistics
protected TransactionStatistics lastCommittedStatistics
-
lastRollbackedStatistics
protected TransactionStatistics lastRollbackedStatistics
-
activeStatistics
protected final Map<Object,DefaultTransactionStatistics> activeStatistics
-
-
Method Detail
-
bindManagementInterface
protected void bindManagementInterface()
-
unbindManagementInterface
protected void unbindManagementInterface()
-
lookup
protected org.apache.geronimo.transaction.manager.TransactionManagerImpl lookup()
-
id
public static String id(javax.transaction.Transaction tx)
-
threadAssociated
public void threadAssociated(javax.transaction.Transaction tx)
- Specified by:
threadAssociated
in interfaceorg.apache.geronimo.transaction.manager.TransactionManagerMonitor
-
threadUnassociated
public void threadUnassociated(javax.transaction.Transaction tx)
- Specified by:
threadUnassociated
in interfaceorg.apache.geronimo.transaction.manager.TransactionManagerMonitor
-
getActiveStatistics
public List<TransactionStatistics> getActiveStatistics()
- Specified by:
getActiveStatistics
in interfaceTransactionMonitor
-
getActiveCount
public long getActiveCount()
- Specified by:
getActiveCount
in interfaceTransactionMonitor
-
getTotalCommits
public long getTotalCommits()
- Specified by:
getTotalCommits
in interfaceTransactionMonitor
-
getTotalRollbacks
public long getTotalRollbacks()
- Specified by:
getTotalRollbacks
in interfaceTransactionMonitor
-
getLastCommittedStatistics
public TransactionStatistics getLastCommittedStatistics()
- Specified by:
getLastCommittedStatistics
in interfaceTransactionMonitor
-
getLastRollbackedStatistics
public TransactionStatistics getLastRollbackedStatistics()
- Specified by:
getLastRollbackedStatistics
in interfaceTransactionMonitor
-
thisStatistics
protected DefaultTransactionStatistics thisStatistics()
-
beforeCompletion
public void beforeCompletion()
- Specified by:
beforeCompletion
in interfacejavax.transaction.Synchronization
-
afterCompletion
public void afterCompletion(int code)
- Specified by:
afterCompletion
in interfacejavax.transaction.Synchronization
-
toggle
public boolean toggle()
- Specified by:
toggle
in interfaceTransactionMonitor
-
getEnabled
public boolean getEnabled()
- Specified by:
getEnabled
in interfaceTransactionMonitor
-
-