JEE 6 and 7, something to think about

jee

I recently switched jobs and I have being working on upgrading our applications to JEE 6. Our applications run currently on oc4j(J2EE 1.3). I never heard of oc4j until I took this position.

What I notice is that JEE has made some really good improvements. Things just work. I have being using spring for years and I still love spring. I think a mixture of spring and JEE would be great for any development environment.

The ease of EJBs development is as easy as annotating and your beans get discovered by the container and injected to a managed bean (Context Dependency Injection).

Smart defaults and conventions were a big plus. One interesting thing I discovered was TomEE(Apache Tomcat Enterprise Edition). This allows tomcat users to use most of all what JEE 6 has to provide.

I am experimenting with version 1.5.2. The only issue I have found so far was looking up the datasource through JNDI when configured in CATALINA_HOME/conf/tomee.xml. For some unknown reason JNDI lookup would just not work.

The workaround is to fallback to tomcat's JNDI configuration.  I prefer to configure my datasource per application and not globally. So I just include a context.xml in the particular application's META-INF folder  e.g web-app/META-INF/context.xml.

TomEE is smart enough to include tomcat's resources in it contexts lookup. Looking at the logs, you would see the actual lookup names loaded into openEJB/openWebBeans. I think using plain servlet 3.x really reduces the need for web frameworks.

Big thanks to all the guys who have work so hard to make this possible..... Glassfish  server is something worth spending time to learn. Give JEE a try. You would not regret it.