Feature #14
Upgrade to latest JOTM version
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
fixed
Description
While investigating the backup transaction, I was remind about how old our version of JOTM is. There seem to have been substantial bug and performance improvements in general that we might benefit from. We do have a patched version of JOTM, but Simon doesn't recall why that is. He suggests dropping the new one in place and seeing if the tests pass as the interfaces are unlikely to have changed.
Updated by ronald - about 17 years ago
I had a quick look and compared the original jar with your patched jar,
<br/>
and only one file changed: org/objectweb/jotm/TransactionImpl.class .
<br/>
So I extracted that file from each and ran jad on them. Here's the diff:
<br/>
<br/>
{noformat}
<br/>
------------------------------------------------------------------------
<br/>
--- [[TransactionImpl]].jad.orig 2006-10-27 23:05:02.000000000 -0700
<br/>
+++ [[TransactionImpl]].jad.patch 2006-10-27 23:05:18.000000000 -0700
<br/>
@@ -47,7 +47,8 @@
<br/>
enlistedXARes = Collections.synchronizedList(new [[ArrayList]]());
<br/>
delistedXARes = null;
<br/>
propagateCtx = true;
<br/>
- [[TraceTm]].jta.debug("xid=" + xid + ", timeout=" + timeout);
<br/>
+ if (TraceTm.jta.isDebugEnabled())
<br/>
+ [[TraceTm]].jta.debug("xid=" + xid + ", timeout=" + timeout);
<br/>
myXid = xid;
<br/>
myCtx = new [[InternalTransactionContext]](timeout, null, xid);
<br/>
}
<br/>
@@ -74,7 +75,8 @@
<br/>
public void commit()
<br/>
throws [[RollbackException]], [[HeuristicMixedException]], [[HeuristicRollbackException]], [[SecurityException]], [[SystemException]]
<br/>
{
<br/>
- [[TraceTm]].jta.debug("commit transaction (tx=" + this + ")");
<br/>
+ if (TraceTm.jta.isDebugEnabled())
<br/>
+ [[TraceTm]].jta.debug("commit transaction (tx=" + this + ")");
<br/>
Terminator term = myCtx.getTerminator();
<br/>
if (term != null)
<br/>
{
<br/>
@@ -231,8 +233,11 @@
<br/>
public void doDetach(int flag)
<br/>
throws [[SystemException]]
<br/>
{
<br/>
- [[TraceTm]].jta.debug("flag=" + XAResourceHelper.getFlagName(flag));
<br/>
- [[TraceTm]].jta.debug("number of enlisted=" + enlistedXARes.size());
<br/>
+ if (TraceTm.jta.isDebugEnabled())
<br/>
+ {
<br/>
+ [[TraceTm]].jta.debug("flag=" + XAResourceHelper.getFlagName(flag));
<br/>
+ [[TraceTm]].jta.debug("number of enlisted=" + enlistedXARes.size());
<br/>
+ }
<br/>
delistedXARes = new [[ArrayList]](enlistedXARes);
<br/>
for (int i = 0; i < delistedXARes.size(); i++)
<br/>
delistResource((XAResource)delistedXARes.get(i), flag);
<br/>
@@ -242,8 +247,11 @@
<br/>
public void doAttach(int flag)
<br/>
throws [[SystemException]], [[RollbackException]]
<br/>
{
<br/>
- [[TraceTm]].jta.debug("flag=" + XAResourceHelper.getFlagName(flag));
<br/>
- [[TraceTm]].jta.debug("number of enlisted=" + enlistedXARes.size());
<br/>
+ if (TraceTm.jta.isDebugEnabled())
<br/>
+ {
<br/>
+ [[TraceTm]].jta.debug("flag=" + XAResourceHelper.getFlagName(flag));
<br/>
+ [[TraceTm]].jta.debug("number of enlisted=" + enlistedXARes.size());
<br/>
+ }
<br/>
if (flag == 0x8000000)
<br/>
{
<br/>
for (int i = 0; delistedXARes != null && i < delistedXARes.size(); i++)
<br/>
@@ -255,7 +263,8 @@
<br/>
<br/>
public List getEnlistedXAResource()
<br/>
{
<br/>
- [[TraceTm]].jta.debug("TransactionImpl.getEnlistedXAResource - size=" + enlistedXARes.size());
<br/>
+ if (TraceTm.jta.isDebugEnabled())
<br/>
+ [[TraceTm]].jta.debug("TransactionImpl.getEnlistedXAResource - size=" + enlistedXARes.size());
<br/>
return new [[ArrayList]](enlistedXARes);
<br/>
}
<br/>
<br/>
@@ -469,7 +478,8 @@
<br/>
<br/>
public Xid getXid()
<br/>
{
<br/>
- [[TraceTm]].jta.debug("myXid=" + myXid);
<br/>
+ if (TraceTm.jta.isDebugEnabled())
<br/>
+ [[TraceTm]].jta.debug("myXid=" + myXid);
<br/>
return myXid;
<br/>
}
<br/>
<br/>
------------------------------------------------------------------------
<br/>
{noformat}
<br/>
<br/>
As you can see, the only change was to put all jta.debug() statements
<br/>
inside an 'if (jta.isDebugEnabled())'. I.e. no functional changes,
<br/>
just a performance tweak.
<br/>
<br/>
Updated by ronald - almost 16 years ago
- Status changed from New to Closed
- Resolution set to fixed