JavaPolis 2005: Some more comments javacode 9085791

JavaPolis 2005: Some more comments

Some of my colleagues have posted their comments to JavaPolis 2005 on our weblog already. See the AMIS Technology blog for these weblog entries. I’ll add my comments to these where appropriate in this entry.

I only attended the first conference day, Wednesday December 14. The conference location was quite nice. In a large exibition room, many sponsors and companies were grouped together creating a nice atmosphere. For some reason, the stand where every visitor could get a backpack with some JavaPolis info was at the back of the exibition room. I found this a bit odd, but I guess it was done on purpose to make every visitor cross the exibition room at least once .

The first presentation I attended was about JMX, the Java Monitoring Extensions. Available previously in addon jars, JMX is included in the Sun JDK version 5. The presenter, Eamonn McManus, first gave a nice and detailled overview of the JConsole application shipped with Java 5. He showed some of the standard MBeans in JConsole, which allow you e.g. to connect to a running JVM and get an overview of the current memory usage, heap size, number of events triggered and their types etc.

Next, Eamonn presented five ways of connecting your app to JMX. These ways included doing it the AOP way and using Spring. Unfortunately I was too busy paying attention that I didn’t make any notes about all of this. Let’s hope BE-JUG will soon upload all presentation slides to the JavaPolis website.

Finally, Eamonn gave a few links to JMX info. These were Project Glassbox on java.net, Project Mustang on java.net and the Sun JMX website.

The next presentation I attended was about EJB 3.0 by Linda DeMichiel and Mike Keith. Basically, the presentation focussed on the new concepts of EJB 3.0 with respect to EJB 2.1: “Easier to learn, easier to use”. In a bunch of slides Linda and Mike showed the difference in approach and code between versions 2.1 and 3.0. Despite the fact that I never had the honour of using EJB 2.1, the difference with 3.0 was striking.

For those out there now using EJB 2.1 there also was a good message: EJB 3.0 remains compatible with 2.1 so no recoding is needed. Way to go EJB 3.0!

Next presentation was about SDO which means Service Data Objects. Despite the comment on the JavaPolis page for this presentation that this presentation was intended for beginners, I got the impression some knowledge about SDO was needed to be able to understand what this is all about. At the end of the presentation it still wasn’t clear to me what SDO exactly is. I got the impression that SDO can be used to connect data providing applications with each other, but I got lost in the code slides during the presentation so I still am not sure. Pity.

Next, the new features of the upcoming JEE5 was on my agenda. Even though I attended the presentation about EJB 3.0 and do a lot with JavaServer Faces, there were several new items for me in this presentation. First of all, JEE5 will contain a persistency layer that can also be used in non-JEE applications. Finally! Also the new simplified webservices support was presented. Another nice new feature will be serializable resultset classes. And again the words “annotations” and “simplification” rang throughout the presentation, just as in the EJB 3.0 one.

The release schedule will probably be as follows: the specs will be final this quarter, a Beta release is to be expected in the first quarter of 2006 with a final release in the second quarter of 2006. For more info about this, see Project Glassfish on java.net.

The final two presentations by Brian Goetz I attended were both related to Java concurrency and threading and were real eye openers to me. The first of these two was about concurrency in Java5. Brian presented a lot of the concurrency classes like Executors, Queues, BlockingQueues, Synchronizers and the difference between Concurrent and Synchronized.

In the second part of this presentation, Brian dived in some of this again in a more advanced way. Using code examples he showed how to get rid of most of the synchronized keywords in your code and presented the benefits of using the concurrency classes. Basically, it leads to cleaner, more threadsafe applications.

The second of these two dealt with the Java Memory Model, again presented by Brian Goetz. Brian showed great and indepth knowledge about issues that can arise with modern computer hardware. Will your synchronized code guaranteedly do what you expect it to do? Brian claims not and for an encore shows to be right. Modern processors and cacheing mechanisms can skrew up a lot. Lines of code can be executed in a different order for optimization and values of variables may get stuck in one of several layers of cacheing which means that one thread may see a different value for a variable than another thread.

Fortunately, Brian showed a few nice ways to avoid these problems. The big eye opener for me was to hear that the synchronized keyword not only ensures that code in the synchronized block will be executed in the order the programmer has put them, but also that this keyword will ensure that variable values held in cache are flushed so all threads see the same values. Besides that, Brian revealed that this functionality only has been really working since Java5. So I guess that any serious multithreading programmer should consider upgrading to Java5.

For more info about this, see Brian Goetz’s homepage.

So, that about wraps it up for me. JavaPolis showed me that Java conferences continue to be fun, interesting and rich in information. Hopefully next time I will win that Sun Blade workstation as well

One Response

  1. mrskin October 2, 2006