adam bien's blog

openEJB, JBoss and Glassfish - Interesting New Features (JavaOne afterglow) 📎

Some of my favorite features, as unordered list: 

  •  openEJB embeddable container. It is easy to test EJB 3 outside the container. The overhead is minimal. You only need few additional lines of code: 
    Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
    Context context = new InitialContext(props);
    Hello hello = (Hello) context.lookup("HelloBeanLocal");

    The embeddable container is very fast. The initialization with the execution of a simple test takes 0.8s on my machine. Its fairly easy to use. I downloaded and installed the server, Netbeans RC1 and wrote the sample app in about 20 minutes. The container comes, however, with several JARs, which is a bit inconvenient to use. A single JAR would be more compelling. [Btw. this feature isn't new, but I really like it]
  • JBoss comes with interesting transactional service for RESTFul services. The transaction service is able to coordinate XA transactions and is implemented in RESTFul way itself. I had to chance to discuss the implementation with the architect - its nicely designed. The RESTFul TX service is less interesting for XA and even more for the design of local, idempotent transactions. The service is available in SVN only.
  • Glassfish v3 will come with RESTFul administration capabilities. You will be able to administer your server and domain via HTTP. This makes the administration and monitoring scriptable and available for tools like RightScale. You could even build a "mini cloud" (aka CloudFish :-)), with this technology and create, start or shutdown new instances on demand. The engineer promised me to make the functionality available before his vacations - let see :-)