Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 3 of 6
http://localhost:8080/tomee/
You should see something similar to the screenshot in Figure 1.
From this page you can click on "Testing your setup" to ensure that everything is working. This test suite first checks that
the openejb directory and environment are properly setup. It then tests that the OpenEJB classes can be loaded and initialized, and that
the JNDI lookups work. If all the tests pass then you're ready to start deploying your applications to TomEE.
Deploying application artifacts to TomEE is very similar to deploying to Tomcat: simply copy your WAR or EAR file to the tomee/webapps folder. When TomEE sees your WAR or EAR file, it will explode your archive into a directory with the same name, but without
the .war or .ear extension.
TomEE supports a new feature introduced with Java EE 6, which is the ability to deploy your EJBs and web artifacts in a single
web archive (WAR file). The purpose of doing this is to enable your web application and your EJBs to share the same classloader
and third-party libraries (such as Spring), and to allow servlets to see EJB classes and EJBs to see servlet classes. For
packaging purposes, the web.xml and ejb-jar.xml files live in the same WAR file.
This new packaging scheme is quite a difference from J2EE and even Java EE 5, which both required a strict separation between EJBs and Web code. If you still need these layers of separation, you can package your WAR file and EJB JAR files inside an EAR file. If you do not need the separation, however, it is more performant and much easier to configure all your classes in the same archive while sharing the same class loader.
An enterprise application would be pretty useless if it never interacted with any external resources. There are two basic strategies for defining resources:
Container managed resources are configured in the container, outside of the application itself. The application subsequently acquires those resources from the container when it needs them. Application managed resources are defined at the application-level, usually through configuration files. They are wired into the application on load or when needed.
The benefit of container managed resources is that the same application can run in different environments with just a few simple environmental configuration changes. For example, in a QA environment an application might be configured to persist data to and from a QA database and publish messages to QA topics; but in a User Acceptance Testing (UAT) environment those external resources would be different. Having the environmental configuration performed on the container also removes the risk that the application will inadvertently point to the wrong environment (such as deploying an application to a production environment that is pointing to a QA database). Finally, most monitoring tools provide the ability to automatically discover container managed resources that publish resource metrics via Java Management Extensions (JMX). Most production support teams for medium- to large-scale applications configure resources at the container-level.
More about deployment servers, containers, and platforms on JavaWorld
From Apache's OpenEJB/TomEE homepage
More from JavaWorld