Methods Summary |
---|
public java.lang.Object | createPerClass(org.jboss.aop.Advisor advisor)
QueuedTxLock lock = new QueuedTxLock();
advisor.getClassMetaData().addMetaData(QueuedTxLock.TXLOCK, QueuedTxLock.TXLOCK, lock, PayloadKey.TRANSIENT);
return new TxLockInterceptor(getTransactionManager(), lock);
|
public java.lang.Object | createPerInstance(org.jboss.aop.Advisor advisor, org.jboss.aop.InstanceAdvisor instanceAdvisor)
SimpleMetaData instanceData = instanceAdvisor.getMetaData();
QueuedTxLock lock = null;
synchronized(instanceData)
{
lock = (QueuedTxLock)instanceData.getMetaData(QueuedTxLock.TXLOCK, QueuedTxLock.TXLOCK);
if (lock == null)
{
lock = new QueuedTxLock();
instanceData.addMetaData(QueuedTxLock.TXLOCK, QueuedTxLock.TXLOCK, lock, PayloadKey.TRANSIENT);
}
}
return new TxLockInterceptor(getTransactionManager(), lock);
|
public java.lang.Object | createPerJoinpoint(org.jboss.aop.Advisor advisor, org.jboss.aop.joinpoint.Joinpoint jp)
throw new RuntimeException("this interceptor only supports PER_CLASS and PER_INSTANCE");
|
public java.lang.Object | createPerJoinpoint(org.jboss.aop.Advisor advisor, org.jboss.aop.InstanceAdvisor instanceAdvisor, org.jboss.aop.joinpoint.Joinpoint jp)
throw new RuntimeException("this interceptor only supports PER_CLASS and PER_INSTANCE");
|
public java.lang.Object | createPerVM()
throw new RuntimeException("this interceptor only supports PER_CLASS and PER_INSTANCE");
|
public java.lang.String | getName()
return getClass().getName();
|
private static javax.transaction.TransactionManager | getTransactionManager()
try
{
InitialContext ctx = new InitialContext();
TransactionManager tm = (TransactionManager) ctx.lookup("java:/TransactionManager");
return tm;
}
catch (NamingException e)
{
throw new RuntimeException(e);
}
|