Searchable Wiki Title: Tomcat Standalone vs Embedded
What are the advantages and disadvantages of using Tomcat embedded inside of JBoss Application Server versus running Tomcat independently?
If you are using advanced J2EE features (JMS, JAAS, EJB, etc.), then you need a complete J2EE application server (JBoss AS) and one question to consider is whether you need to separate the JSP/Servlet tier from the application server. In this scenario, you should consider using Apache Tomcat inside of JBoss AS for significant performance improvements (ex. JSPs can call EJBs via pass-by-reference), unless your architecture or corporate security policies dictate otherwise.
If you are using Tomcat for basic JSPs and servlets then read below.
Advantages of Tomcat inside JBoss AS :
Easily grow and enhance your applications when other J2EE requirements arise (EJB, JMS, JAAS, etc.)
JDBC connection pooling
Advanced clustering
Simple method of deploying/undeploying applications to entire cluster (farm deployment)
Improved performance through HttpSession replication via JBossCache
Simplified Hot Deployment & Hot Redeployment
AOP enablement of JSPs & Servlets
Ability to easily upgrade to using J2EE services such as JMS, JTA, JNDI, etc.
Ability to centrally manage and monitor Tomcat with other JBoss services
Write access to JNDI at runtime (Tomcat's is read-only at runtime)
If you run the JBoss AS 4.0.3 (or higher) installer at http://www.jboss.com/products/jbossas/downloads, you can choose from a variety of install profiles including a profile that installs Tomcat along with additional JMX JTA, JNDI, Security, and deployment services pre-configured.
Advantages of Tomcat Standalone:
Maybe simplicity of administration? (although this may be of little value because the JBoss MicroKernel allows you to strip down the application server so there is little else running)
Defaults to isolated classloading for WARs (however, there is a simple configuration in JBoss AS called "UseJBossWebLoader" which does the same thing)
Red Hat provides subscription support contracts for Tomcat embedded inside JBoss and Tomcat embedded inside RHEL.
-
Referenced by:
Comments