<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">To improve performance, we started looking
at ReentrantReadWriteLock and ConcurrentHashMap (from java.util.concurrent)
package.</font>
<br><font size=2 face="sans-serif">We are also looking at ThreadPoolExecutor
and related classes to implment parallel query / batch execution (most
of these classes are also available in java.util.concurrent as well as
backport jar).</font>
<br><font size=2 face="sans-serif">Since compatibility with Java 1.4 is
essential, we started looking at the build script retroweave target that
uses Retroweaver 1.2.4.</font>
<br>
<br><font size=2 face="sans-serif">Retroweaver without our changes works
fine. We ran into problems while using the current retroweaver version
and build target after our changes. </font>
<br>
<br><font size=2 face="sans-serif">We have a simple class LockTest to reproduce
the problem:</font>
<br><font size=2 face="sans-serif">=============================================================================================</font>
<br><font size=2 face="sans-serif">package mondrian;</font>
<br>
<br><font size=2 face="sans-serif">import java.util.concurrent.ConcurrentHashMap;</font>
<br><font size=2 face="sans-serif">import java.util.concurrent.locks.ReentrantReadWriteLock;</font>
<br><font size=2 face="sans-serif">import java.util.concurrent.locks.Lock;</font>
<br>
<br><font size=2 face="sans-serif">public class LockTest {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; ConcurrentHashMap&lt;String,
String&gt; cache = new ConcurrentHashMap&lt;String, String&gt;();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; ReentrantReadWriteLock
lock;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; Lock r ; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; Lock w ;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; public LockTest()</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cache =
new ConcurrentHashMap();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; lock = new
ReentrantReadWriteLock();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;Before
lock = &quot; + lock);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; w = lock.writeLock();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; r = lock.readLock();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;After
lock = &quot; + lock);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; }</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; public static void main(String[]
args) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; LockTest
lt = new LockTest();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;i
am inside main method&quot;);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; }</font>
<br><font size=2 face="sans-serif">}</font>
<br><font size=2 face="sans-serif">=============================================================================================</font>
<br><font size=2 face="sans-serif">When we retroweave it with retroweaver
1.2.4 (using ANT as well as retroweaver UI) and run the weaved class using
Java 1.4.2, we get java.lang.NoSuchMethodError. Stack is:</font>
<br>
<br><font size=2 face="sans-serif">java.lang.NoSuchMethodError: edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantReadWriteLock.writeLock()</font>
<br><font size=2 face="sans-serif">Ledu/emory/mathcs/backport/java/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;</font>
<br><font size=2 face="sans-serif">[Loaded java.lang.StackTraceElement
from C:\j2sdk1.4.2_14\jre\lib\rt.jar]</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; at mondrian.LockTest.&lt;init&gt;(LockTest.java:26)</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; at mondrian.LockTest.main(LockTest.java:34):</font>
<br>
<br><font size=2 face="sans-serif">We have backport jar in our class path
(please note that we are NOT getting ClassNotFoundExcecption).</font>
<br><font size=2 face="sans-serif">Did someone face this issue earlier?
Please let us know if we are missing something here.</font>
<br>
<br><font size=2 face="sans-serif">We also tried out retroweaver 2.0 without
success.</font>
<br>
<br><font size=2 face="sans-serif">As an alternative, we tried Retrotranslator(http://retrotranslator.sourceforge.net)
and everything worked in first attempt. We propose to create a new target
for Retrotranslator and add the related libraries. Please let us know your
thoughts on this</font>
<br>
<br><font size=2 face="sans-serif">Thanks and regards,</font>
<br><font size=2 face="sans-serif">Tushar, Ajit</font>
<br>
<br>