}
}
public TransactionAdminBean getTransactionAdminBean(Transaction t)
throws javax.transaction.SystemException {
TransactionAdminBean tBean = null;
if(t instanceof com.sun.jts.jta.TransactionImpl) {
String id = ((com.sun.jts.jta.TransactionImpl)t).getTransactionId();
long startTime = ((com.sun.jts.jta.TransactionImpl)t).getStartTime();
long elapsedTime = System.currentTimeMillis() - startTime;
String status = JavaEETransactionManagerSimplified.getStatusAsString(t.getStatus());
JavaEETransactionImpl tran = (JavaEETransactionImpl)globalTransactions.get(t);
if(tran != null) {
tBean = ((JavaEETransactionManagerSimplified)javaEETM).getTransactionAdminBean(tran);
// Override with JTS values
tBean.setIdentifier(t);
tBean.setId(id);
tBean.setStatus(status);
tBean.setElapsedTime(elapsedTime);
if (tBean.getComponentName() == null) {
tBean.setComponentName("unknown");
}
} else {
tBean = new TransactionAdminBean(t, id, status, elapsedTime,
"unknown", null);
}
} else {
tBean = ((JavaEETransactionManagerSimplified)javaEETM).getTransactionAdminBean(t);
}