Saturday, August 26, 2006
jsr166x in Java 5
Update on 27Aug06: It turns out including ConcurrentLinkedDeque is not such a good idea, and therefore removed in Beanlib 3.2.5. As pointed out by Doug Lea, this class will be replaced with something much better in Java 7.
Ever thought of taking advantage of those concurrent classes such as ConcurrentSkipListMap in Java 6 beta, but still being trapped in a Java 5 environment ? Well the entire jsr166x package has now been ported to beanlib 3.2.4, with sources augmented with the latest from Java 6 beta 2. This included even the ConcurrentLinkedDeque which is currently missing in Java 6.
Ever thought of taking advantage of those concurrent classes such as ConcurrentSkipListMap in Java 6 beta, but still being trapped in a Java 5 environment ? Well the entire jsr166x package has now been ported to beanlib 3.2.4, with sources augmented with the latest from Java 6 beta 2. This included even the ConcurrentLinkedDeque which is currently missing in Java 6.
Thursday, August 03, 2006
Enable Remote Debugging + JMX, etc. from Ant
Sample configuration:
Nice articles on tuning GC can be found here, here and here.
Java Ant Task here.
Nice resource for setting up Remote Debugging for Java.<target name="mytarget">
<java classname="my.packagename.MyMainClassName"
fork="yes"
>
<!-- For remote debugging -->
<sysproperty key="DEBUG" value="true" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" />
<!-- For enabling JMX monitoring -->
<sysproperty key="com.sun.management.jmxremote.port" value="8001" />
<sysproperty key="com.sun.management.jmxremote.authenticate" value="false" />
<sysproperty key="com.sun.management.jmxremote.ssl" value="false" />
<!-- GC tuning. -->
<jvmarg value="-verbose:gc" />
<jvmarg value="-server" />
<jvmarg value="-XX:+UseParallelGC" />
<jvmarg value="-XX:GCTimeRatio=19" />
<!-- Heap tuning. -->
<jvmarg value="-Xms512m" />
<jvmarg value="-Xmx512m" />
<!-- JNI -->
<env key="LD_LIBRARY_PATH" value="/my/so/directory" />
<!-- Arguments, if any -->
<arg value="my.argument"/>
</java>
<classpath>
<pathelement path="${sample.dir}"/>
<path refid="sample.classpath"/>
</classpath>
</target>
Nice articles on tuning GC can be found here, here and here.
Java Ant Task here.