Skip to main content

A Short Trip to Open Source Land

Posted by edort on June 29, 2005 at 2:29 PM PDT

This morning I took a trip to open source land by attending back-to-back sessions on JBoss and Hibernate.

I always find it interesting to learn how people get exposed to their passions. In Bill Burke's case, his exposure to JBoss was pretty much driven by desperation. Burke, who was the speaker for the session "The JBoss Kernel: Plug and Play J2EE," was working for a startup the was in the process of going belly up. Money was drying up, and the company lost its license to the proprietary app server it was using. Someone in the comopany told Burke "I think there's some freeware/shareware out there called JBoss. Why don't you look at it?" Burke did and was soon hooked. He got even more entrenched into JBoss a bit later, when Marc Fleury, JBoss's CEO, asked him if he wanted to take the "red pill." (Those of you who've seen the Matrix movies know what taking the red pill means. For those who don't, let's say that it gives you a fresh and unobstructed view of reality.) Fast forward a bit, and now Burke is the Chief Architect for JBoss.

The reason most folks turn to JBoss in pretty much the same reason Burke turned to it. No, they're not all working for dying companies that are desperate, rather, they're all interested in an open source Java application server. The great thing about an open source app server is that you can extend it in ways that you need. One example of this is JBoss's use of interceptors to extend MBean services. (JBoss is built on top of the JMX architecture, and all JBoss services are MBeans.) Interceptors are a very flexible means of incorporating new behavior into applications deployed on the apps server. For example, Burke talked about a defense contractor that needed to use a proprietary security protocol in its applications on JBoss. Using interceptors on both the client and the server, the company was able to invoke the protocol when they needed.

MBeans also gives JBoss a way to expose metadata about services so that it's easy to write tools that access this metadata. Burke showed a console tool that did just that.

Dunno if I've quite got this right, but during Burke's talk, it did appear that JBoss can even extend annotations. For example, Burke showed an annotation that invokes EJB methods in a background thread. Burke then showed how a constraint can be put on the invocation such that only void methods will be run in the background (I think).

... and speaking of annotations, that leads me to the second session I attended. In this one, Gavin King, the founder of the Hibernate project spoke about some of the new things in Hibernate 3.0 (which has been available for a few months, and is now considered stable enough for production use). He also talked about some things planned for 3.1. Hibernate is open source object/relational mapping service for Java. Long separate from EJB, Hibernate and EJB forces are now coming together. In fact, King is on the EJB 3.0 expert group (as is Burke), and Hibernate fetures are making their way into EJB 3.0

One thing to be aware of is that there's lots of stuff going on in the Hibernate project. King showed six different subprojects that are in progress. One is a subproject on Hibernate annotations, another is on Hibernate-specific extensions such as constraints.

King spent most of his talk on identifying some of the major problems in object/relational mapping that Hibernate 3.0 and 3.1 try to address. For example, there are problems in inheritance mappings between object and relational models. Object models often include more information about subtype associations than relational database models (case in point: you can have an EffectiveDated abstract superclass in an object model, but you can't have an EFFECTIVE_DATED table). However, sometimes the relational model has subtyping that cannot be expressed in an object model (for instance, an object can only have one type, a relational database can have multiple types).

One of the new features in Hibernate 3.0 that King highlighted (and called "the coolest thing") is filtering. This feature allows a user to see temporal, regional, permissioned data -- in other words, data that's valid for a particular point in time, or data that the user has permission to see only for a particular region. Filter conditions are defined as SQL fragments in a mapping document, and can be applied cumulatively. King said that what's nice about this feature is that it turns messy dynamic queries (that is, queries where you have lots of join conditions) into a simple declarations.

For Hibernate 3.1, King highlighted some extensions to bulk update/delete, a new StatelessSession streaming API (that offers a more JDBC approach to streaming data into and out of a database), and "break" processing for ScrollableResults.

To find out more about these features, and what's going on in Hibernate, see

Both of these sessions were very well attended (a large room filled with lots of folks), but King's was pretty much standing room only. So I guess one could say that more folks came out of "Hibernateion" for the second talk. ;-)