One archive

The basic idea of this approach is that your Servlets and EJBs are together in your WAR file as one app. * No classloader boundries between Servlets and EJBs * EJBs and Servlets can share all third-party libraries (like Spring!) - no EAR required. * Can put the web.xml and ejb-jar.xml in the same archive (the WAR file). * EJBs can see Servlet classes and vice versa.

Not quite J2EE (it is truly JEE6)

This is very different than J2EE or Java EE 5 as there aren't several levels of separation and classloader hierarchy. This is going to take some getting used to and it should be understood that this style of packaging isn't J2EE compliant. Who would care tough as it is a feature of Java EE 6 we would've been waiting for so long.

J2EE classloading rules: * You cannot ever have EJBs and servlets in the same classloader.

Example with Tomcat

If you want to try to work with Servlets/JSP and OpenEJB using Tomcat, see the setup page and the "/webapps/ejb-examples" section of the [openejb-examples.zip|Download] available on the download page.