Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

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

Open source Java projects: TomEE

Scale to enterprise with the Java EE 6 Web container built on Tomcat

  • Print
  • Feedback

Page 6 of 6

Listing 5. Wiring in a JMS resources

public MyClass {
   ...
   @Resource
   private ConnectionFactory myJmsConnectionFactory;

   @Resource(name = "fooQueue", type = javax.jmx.Queue.class)
   private Queue fooQueue;
   
   @Resource(name = "barTopic", type = javax.jmx.Topic.class)
   private Queue fooQueue;
}

In conclusion: TomEE or just Tomcat?

TomEE is a Java EE 6 Web Profile-compliant container that builds on the simplicity of Tomcat and adds to its enterprise capabilities. The development strategy of keeping things simple and retaining the essence of Tomcat has resulted in a very lightweight container that starts up quickly and does not add to the memory requirements of Tomcat. Thus, TomEE provides a solution for organizations looking to embrace enterprise-scale technologies but deploy to a reasonably sized environment.

For developers and shops needing to decide between TomEE and Tomcat, I would break it down this way:

  • Tomcat is a web container, meaning that it supports the Servlet specification, JSP and JSF specifications, and provides support for JDBC. If these capabilities satisfy the requirements of your application then by all means stick with Tomcat.
  • TomEE is a true enterprise deployment platform; it provides a lightweight and inexpensive infrastructure for building enterprise applications that must leverage technologies like JMS, JTA, JPA, and EJBs.

It is possible (as discussed in detail here) to utilize Tomcat as an enterprise server. I am currently working on a large-scale application and we are deploying to a variation of Tomcat. But in order to meet our application's needs, we have also incorporated a separate Enterprise Service Bus (ESB), client messaging technologies, and liberal use of web services. So we assembled the technologies that we wanted to use into Tomcat -- functionality that TomEE would have provided out of the the box. (Our case illustrates another reason for using Tomcat, which is that our application isn't entirely open source. We needed the flexibility that Tomcat provides.)

Coming up next in the Open source Java projects series: GitHub!

Read more about Tools & Methods in JavaWorld's Tools & Methods section.

  • Print
  • Feedback

Resources

More about deployment servers, containers, and platforms on JavaWorld

From Apache's OpenEJB/TomEE homepage

More from JavaWorld