<?xml version="1.0" encoding="iso-8859-1"?>

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  xmlns:admin="http://webns.net/mvcb/"
  xmlns:cc="http://web.resource.org/cc/"
  xmlns="http://purl.org/rss/1.0/">

<channel rdf:about="http://blogs.codehaus.org/people/jboner//archives/java.html">
<title>grubbel - java</title>
<link>http://blogs.codehaus.org/people/jboner//archives/java.html</link>
<description></description>
<dc:language>en-us</dc:language>
<dc:creator></dc:creator>
<dc:date>2005-11-01T17:32:46+01:00</dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=2.661" />

<items>
<rdf:Seq><rdf:li rdf:resource="http://blogs.codehaus.org/people/jboner/archives/001212_improving_hotswap_is_a_dead_end_road.html" />
<rdf:li rdf:resource="http://blogs.codehaus.org/people/jboner/archives/001169_ill_buy_you_a_beer.html" />
<rdf:li rdf:resource="http://blogs.codehaus.org/people/jboner/archives/001166_thanks_jrockit.html" />
<rdf:li rdf:resource="http://blogs.codehaus.org/people/jboner/archives/001160_time_to_throw_out_your_distributed_hashmap.html" />
<rdf:li rdf:resource="http://blogs.codehaus.org/people/jboner/archives/001135_use_total_ordering_of_objects_to_avoid_deadlocks.html" />
<rdf:li rdf:resource="http://blogs.codehaus.org/people/jboner/archives/001017_jrockit_5_memory_leak_tool_webex_demo_on_wed.html" />
</rdf:Seq>
</items>

</channel>

<item rdf:about="http://blogs.codehaus.org/people/jboner/archives/001212_improving_hotswap_is_a_dead_end_road.html">
<title>Improving HotSwap Is A Dead End Road</title>
<link>http://blogs.codehaus.org/people/jboner/archives/001212_improving_hotswap_is_a_dead_end_road.html</link>
<description><![CDATA[<p>There has been a lot of discussions about the need for more dynamicity in Java, including the need to support scripting languages.</p>

<p>Most are around the suggestion of improving the HotSwap facility in Java. </p>

<p>For exampe: </p>

<p>* <a href="http://rifers.org/blogs/gbevin/2005/10/31/hotswap_improvement">How badly do you want Hotswap to improve?</a></p>

<p>* <a href="http://blogs.opensymphony.com/plightbo/2005/10/please_vote_the_only_jvm_bug_y.html">PLEASE VOTE: the only JVM bug you'll ever really care about</a></p>

<p>* <a href="http://blogs.opensymphony.com/plightbo/2005/10/gaining_traction_hotswap_impro.html">Gaining traction: HotSwap improvements</a>, </a> </p>

<p>etc.</p>

<p>I have to admit that a year ago I was probably one of the guys that were swearing the most over HotSwap's (and JVM(D/T)I's shortcomings when trying to stretch its (limited) boundries in AspectWerkz. </p>

<p>However, today I think that improving HotSwap and the APIs for bytecode instrumentation in general is a dead end road. It simply adds complexiety, memory overhead, performance overhead as well as introduces the multiple agents problem. </p>

<p>We need to raise the abstraction level and move away from bytecode instrumentation. There is a need for high level VM APIs similar to the one we have been working on in JRockit. For details on the problems with current approaches and how we solve this in a better way, read <a href="http://dev2dev.bea.com/pub/a/2005/08/jvm_aop_1.html">this article</a>.</p>

<p>So, PLEASE, stop wasting time in discussing how to improve bytecode instrumentation (e.g. HotSwap, JVMTI etc.) and give us feedback on how to improve the high-level VM API in JRockit (the prototype is <a href="http://blogs.codehaus.org/people/avasseur/archives/001198_jrockit_powered_aop_prototype_available.html">already available</a>).</p>

<p>When on the subject on supporting scripting languages in Java is think that <a href="http://blogs.sun.com/roller/page/gbracha?entry=invokedynamic">this proposal</a> for adding a <code>invokedynamic</code> bytecode instruction is a step in the right direction.</p>]]></description>
<dc:subject>java</dc:subject>
<dc:creator>jboner</dc:creator>
<dc:date>2005-11-01T17:32:46+01:00</dc:date>
</item>
<item rdf:about="http://blogs.codehaus.org/people/jboner/archives/001169_ill_buy_you_a_beer.html">
<title>I&apos;ll buy you a beer...</title>
<link>http://blogs.codehaus.org/people/jboner/archives/001169_ill_buy_you_a_beer.html</link>
<description><![CDATA[<p>I am at <a href="http://www.ftponline.com/conferences/javaprolive/">JavaPro Live!</a> in San Diego <a href="http://www.ftponline.com/conferences/javaprolive/sessions.aspx#aopdriven">doing a presentation </a>titled: "AOP-Driven Services: Achieve Modularity and Reusability on the J2EE Platform" (the talk is 3:15 on Thursday Sept 14:th). If you are attending the conference, stop by and say hi. </p>

<p>I just finished rewriting the master template for the slides to follow a terra-cotta based color scheme. ;-) </p>

<p>This is actually my second week as a <a href="http://www.terracottatech.com/">Terracotta</a> employee and I am looking forward to the upcoming months. We are currently sketching on some very interesting new stuff, among other things, stuff tied to transparent runtime environments. More on that later. </p>

<p>I will, from now on, spend a lot of time in San Francisco, so if you are in the area, drop me an email and I will buy you a beer :-)<br />
 <br />
Just a warning: If it turns out that you have not tried Terracotta's Virtualization Server and its <a href="http://www.terracottatech.com/product/dso.html">Distributed Shared Objects (DSO)</a>, you will most likely here me rambling about that it is <b>The</b> way of doing distributed programming in Java (e.g. clustering and caching) and why you have to give it a try.</p>]]></description>
<dc:subject>java</dc:subject>
<dc:creator>jboner</dc:creator>
<dc:date>2005-09-13T18:34:52+01:00</dc:date>
</item>
<item rdf:about="http://blogs.codehaus.org/people/jboner/archives/001166_thanks_jrockit.html">
<title>Thanks JRockit</title>
<link>http://blogs.codehaus.org/people/jboner/archives/001166_thanks_jrockit.html</link>
<description><![CDATA[<p>I guess that most people have <a href="http://www.theserverside.com/news/thread.tss?thread_id=36073">not missed</a> that I am leaving <a href="http://bea.com/">BEA</a>. Yesterday was actually my last day as an BEA employee.</p>

<p>I have had two great years at BEA.  It has been a great experience to work at the Java Runtime Products Group (JRPG), (JRPG is the group that implements the <a href="http://dev2dev.bea.com/jrockit/">JRockit JVM</a>), not everyone gets the opportunity to work among so many extremely talented and smart people, and that is something that I am very grateful for.  I have learned more in these two years that I had in my whole career.</p>

<p>I am also grateful for that JRPG has believed in AOP and my vision, so much and that they have allowed me to work full-time for two years to materialize them. </p>

<p>During this two year period we (<a href="http://blogs.codehaus.org/people/avasseur/">Alexandre Vasseur</a> and myself) have had the opportunity to participate in writing three important chapters in this story for AOP in Java:</p>

<p>1. <a href="http://www.theserverside.com/news/thread.tss?thread_id=32534">The release of AspectWerkz 2.0</a><br />
2. <a href="http://www.theserverside.com/news/thread.tss?thread_id=31244">The merge of AspectWerkz and AspectJ</a><br />
3. <a href="http://dev2dev.bea.com/pub/a/2005/08/jvm_aop_1.html">The support for AOP in the JRockit JVM</a> (thanks to Joakim Dahlstedt)</p>

<p>It for sure has been a ride :-)</p>

<p>Thanks JRockit.</p>]]></description>
<dc:subject>java</dc:subject>
<dc:creator>jboner</dc:creator>
<dc:date>2005-09-04T06:07:48+01:00</dc:date>
</item>
<item rdf:about="http://blogs.codehaus.org/people/jboner/archives/001160_time_to_throw_out_your_distributed_hashmap.html">
<title>Time to Throw Out Your Distributed HashMap?</title>
<link>http://blogs.codehaus.org/people/jboner/archives/001160_time_to_throw_out_your_distributed_hashmap.html</link>
<description><![CDATA[<p><a href="http://www.pcal.net/blog/">Patrick Calahan</a> has written an <a href="http://blog.terracottatech.com/archive/2005/08/object_identity.html">interesting article</a> on Distributed Shared Objects (DSO) and how they compare to traditional ways of doing caching and clustering. DSO might just as well be the death of the the distributed hashmap, e.g. JCache etc. Seems to be the only sane way of doing clustering in Java.</p>]]></description>
<dc:subject>java</dc:subject>
<dc:creator>jboner</dc:creator>
<dc:date>2005-08-19T22:10:42+01:00</dc:date>
</item>
<item rdf:about="http://blogs.codehaus.org/people/jboner/archives/001135_use_total_ordering_of_objects_to_avoid_deadlocks.html">
<title>Use Total Ordering of Objects to Avoid Deadlocks</title>
<link>http://blogs.codehaus.org/people/jboner/archives/001135_use_total_ordering_of_objects_to_avoid_deadlocks.html</link>
<description><![CDATA[<p>
Writing multi-threaded applications in Java can as you know be quite tricky, and if not done correctly, one can easily end up with deadlock situations.
</p>

<p>
For example, take a look at this little code snippet.  This piece of Java code implements a Node, which has three methods (that is of our interest):
</p>

<p>
<code>Object get()</code>, <code>void set(Object o)</code> and <code>void swap(Node n)</code>
</p>


<p>
Here's the implementation:
<code language="java">
public class Node {
    private Object value;
    public synchronized Object get() {
        return value;
    }
    public synchronized void set(Object value) {
        this.value = value;
    }
    public synchronized void swap(Node n) {
        Object tmp = get();
        set(n.get());
        n.set(tmp);
    }
   ... // remaining methods omitted 
}
</code>
</p>


<p>
This class might look okay, but it actually suffers from potential deadlock.  For example what happens if, one thread T1 invokes <code>n1.swap(n2)</code> while an other one T2 concurrently invokes <code>n2.swap(n1) </code>?
</p>


<p>
Thread T1 acquires the lock for node n1, and thread T2 acquires the lock for node n2.  Thread T1 now invokes <code>n2.get()</code> (in the <code>swap(..)</code> method). This invocation now has to wait since node n2 is locked by thread T2, this while the reverse holds for thread T2 (e.g. it needs to wait for node n1 which is locked by thread T1). Which means that we have a deadlock.
</p>


<p>
This program is however easily fixed by using the technique of totally ordering all objects in the system.
</p>

<p>
<code language="java">
public class Node {
    private Object value;
    public synchronized Object get() {
        return value;
    }
    public synchronized void set(Object value) {
        this.value = value;
    }
    private synchronized void doSwap(Node n) {
        Object tmp = get();
        set(n.get());
        n.set(tmp);
    }
    public void swap(Node n) {
        if (this ==  n) {
            return;
        } else if (System.identityHashCode(this) < System.identityHashCode(n)) {
            doSwap(n);
       } else {
           n.doSwap(this);
       }
    }
   ... // remaining methods omitted 
}
</code>
</p>


<p>
In this program, all locks will be acquired in increasing order, guaranteed to be the same for all threads, and thereby avoiding deadlock situations.
</p>

]]></description>
<dc:subject>java</dc:subject>
<dc:creator>jboner</dc:creator>
<dc:date>2005-07-27T10:18:54+01:00</dc:date>
</item>
<item rdf:about="http://blogs.codehaus.org/people/jboner/archives/001017_jrockit_5_memory_leak_tool_webex_demo_on_wed.html">
<title>JRockit 5 Memory Leak Tool: webex demo on Wed</title>
<link>http://blogs.codehaus.org/people/jboner/archives/001017_jrockit_5_memory_leak_tool_webex_demo_on_wed.html</link>
<description><![CDATA[<p>The upcoming release of JRockit will contain a new, completely killing, tool for memory leak detection.</p>

<p>It allows you to (among many other things) to profile an application running in production with (almost) zero overhead (without shutting it down or any preparation whatsoever).</p>

<p><a href="http://jboss.org/jbossBlog/blog/bburke/?permalink=7EBA719FA8D7C246482F5E30A5DEDFB1.txt">Bill Burke</a> and <a href="http://www.almaer.com/blog/archives/000833.html">Dion Almaer</a> has already blogged about it.</p>

<p>If you are interested to find out more, we have set up a webinar demo that anyone can join. Drop me an email at [jboner AT gmail DOT com] and I will send you the 'dial in info'.  </p>

<p>------<br />
Update: here is the dial in info (no need to mail me):</p>

<pre>
---------------------------- Web Meeting ---------------------------------
When: Wednesday, March 23, 2005 10:00 AM-11:00 AM (GMT-07:00) Arizona. 
Where: Dial In/Web Meeting 
Web Meeting Address:            https://www.webmeeting.att.com
Toll Free Dial In Number:               (866)214-3176
Int'l Access/Caller Paid Dial In Number:                (404)827-9098
ACCESS CODE:             5519740
--------------------------------------------------------------------------------
</pre>

<p><br />
   </p>]]></description>
<dc:subject>java</dc:subject>
<dc:creator>jboner</dc:creator>
<dc:date>2005-03-21T16:21:12+01:00</dc:date>
</item>


</rdf:RDF>
