Project

General

Profile

Feature #14

Upgrade to latest JOTM version

Added by brian - over 16 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Mulgara
Target 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.
#1

Updated by ronald - about 16 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/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enlistedXARes = Collections.synchronizedList(new [[ArrayList]]());
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delistedXARes = null;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;propagateCtx = true;
<br/>
-        [[TraceTm]].jta.debug(&quot;xid=&quot; + xid + &quot;, timeout=&quot; + timeout);
<br/>
+        if (TraceTm.jta.isDebugEnabled())
<br/>
+            [[TraceTm]].jta.debug(&quot;xid=&quot; + xid + &quot;, timeout=&quot; + timeout);
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myXid = xid;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myCtx = new [[InternalTransactionContext]](timeout, null, xid);
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br/>
@@ -74,7 +75,8 @@
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public void commit()
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throws [[RollbackException]], [[HeuristicMixedException]], [[HeuristicRollbackException]], [[SecurityException]], [[SystemException]]
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br/>
-        [[TraceTm]].jta.debug(&quot;commit transaction (tx=&quot; + this + &quot;)&quot;);
<br/>
+        if (TraceTm.jta.isDebugEnabled())
<br/>
+            [[TraceTm]].jta.debug(&quot;commit transaction (tx=&quot; + this + &quot;)&quot;);
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Terminator term = myCtx.getTerminator();
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (term != null)
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br/>
@@ -231,8 +233,11 @@
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public void doDetach(int flag)
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throws [[SystemException]]
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br/>
-        [[TraceTm]].jta.debug(&quot;flag=&quot; + XAResourceHelper.getFlagName(flag));
<br/>
-        [[TraceTm]].jta.debug(&quot;number of enlisted=&quot; + enlistedXARes.size());
<br/>
+        if (TraceTm.jta.isDebugEnabled())
<br/>
+        {
<br/>
+            [[TraceTm]].jta.debug(&quot;flag=&quot; + XAResourceHelper.getFlagName(flag));
<br/>
+            [[TraceTm]].jta.debug(&quot;number of enlisted=&quot; + enlistedXARes.size());
<br/>
+        }
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delistedXARes = new [[ArrayList]](enlistedXARes);
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (int i = 0; i &lt; delistedXARes.size(); i++)
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delistResource((XAResource)delistedXARes.get(i), flag);
<br/>
@@ -242,8 +247,11 @@
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public void doAttach(int flag)
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throws [[SystemException]], [[RollbackException]]
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br/>
-        [[TraceTm]].jta.debug(&quot;flag=&quot; + XAResourceHelper.getFlagName(flag));
<br/>
-        [[TraceTm]].jta.debug(&quot;number of enlisted=&quot; + enlistedXARes.size());
<br/>
+        if (TraceTm.jta.isDebugEnabled())
<br/>
+        {
<br/>
+            [[TraceTm]].jta.debug(&quot;flag=&quot; + XAResourceHelper.getFlagName(flag));
<br/>
+            [[TraceTm]].jta.debug(&quot;number of enlisted=&quot; + enlistedXARes.size());
<br/>
+        }
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (flag == 0x8000000)
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (int i = 0; delistedXARes != null &amp;&amp; i &lt; delistedXARes.size(); i++)
<br/>
@@ -255,7 +263,8 @@
<br/>
&nbsp;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public List getEnlistedXAResource()
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br/>
-        [[TraceTm]].jta.debug(&quot;TransactionImpl.getEnlistedXAResource - size=&quot; + enlistedXARes.size());
<br/>
+        if (TraceTm.jta.isDebugEnabled())
<br/>
+            [[TraceTm]].jta.debug(&quot;TransactionImpl.getEnlistedXAResource - size=&quot; + enlistedXARes.size());
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return new [[ArrayList]](enlistedXARes);
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br/>
&nbsp;
<br/>
@@ -469,7 +478,8 @@
<br/>
&nbsp;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Xid getXid()
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br/>
-        [[TraceTm]].jta.debug(&quot;myXid=&quot; + myXid);
<br/>
+        if (TraceTm.jta.isDebugEnabled())
<br/>
+            [[TraceTm]].jta.debug(&quot;myXid=&quot; + myXid);
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return myXid;
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br/>
&nbsp;
<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/>

#2

Updated by ronald - almost 15 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

(In r663) Upgrade jotm and associated libs to 2.0.10. Closes #14.

Also available in: Atom PDF