Enterprise JavaBeans 3.0

I went Enterprise JavaBananas over this session. The original goal of EJBs was to simplify the enterprise application development process but what was delivered in the form of the EJB 2.x specification was a powerful yet complex technology. In EJB 2.x, the developer codes against a set of APIs intended for and required by the container.

In EJB 3.0, session and message beans are plain old POJOs with descriptive annotations. For example, a stateless session bean is marked with a @stateless annotation. A stateful session bean is marked as @Stateful. A bean’s pre-destroy life cycle event method is denoted with the @PreDestroy annotation. The good news for EJB 2.x is that that existing applications will be forward compatible, including the deployment descriptors. For the most part, deployment descriptors are not needed in the new specification, except for certain situations, but you can still use them as you have.

Once phrase that I have already heard twice during this conference is configuration by exception. I heard it again in this session. Having experienced Ruby on Rails I know of configuration by convention. How do you configure by exception? I don’t know yet but this is something to look into if you are going to be deploying your application on a EJB 3.0 container.

I was once part of a large enterprise application project. I thought that if I ever worked on an EJB project it would be too soon. Now I can’t wait.