Deploying in TomEE

Deploying applications in TomEE is as simple as deploying them in Tomcat.

You could deploy your application in Eclipse just like how you would deploy with Tomcat. For an example, tomee-and-eclipse shows how to use TomEE with Eclipse.

Or you can simply package your application as a standard WAR file and copy it to the [TomEE]/webapps folder, or as an EAR file and copy it to the [TomEE]/apps folder.

Read on to learn more about packaging EJBs in a WAR file.


One archive

The basic idea of this approach is that your Servlets and EJBs are together in your WAR file as one application.

Not quite J2EE (But it is Java EE 6)

This is very different than J2EE or Java EE 5 as there are not several levels of separation and classloader hierarchy any more.
This may take some getting used to and it is important to understand that this style of packaging is not J2EE compliant.
You should not worry though, as it is an accepted feature of Java EE 6.

J2EE classloading rules: