Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JBoss vs Tomcat again [closed]

Tags:

tomcat

jboss

People also ask

Which is better JBoss or Tomcat?

JBoss offers a modern looking management console, feature-full command-line tools and various utilities that integrate with DevOps tools such as Ansible and Puppet. In contrast, Apache Tomcat is primarily focused on providing a standard, bug-free implementation of the Servlet and JSP API.

Is JBoss the same as Tomcat?

The difference between JBoss and Tomcat is that JBoss is an application server and Tomcat is a servlet container and a web server. They can be used according to the required application. Tomcat is lightweight and does not support EJB and JMS, and JBoss is a full stack of Java EE.

Is Tomcat part of JBoss?

JBoss Application Server comes with Tomcat as the default web container. The embedded Tomcat service is the expanded deploy/jboss-web.

Which is better Tomcat or WildFly?

The difference between WildFly and Tomcat is pretty straightforward: WildFly is a full Java EE application Server, while Tomcat is a Java servlet container and web server and, since because it doesn't come with an implementation of the full JEE stack, it is lighter out of the box.


First the facts, neither is better. As you already mentioned, Tomcat provides a servlet container that supports the Servlet specification (Tomcat 7 supports Servlet 3.0). JBoss AS, a 'complete' application server supports Java EE 6 (including Servlet 3.0) in its current version.

Tomcat is fairly lightweight and in case you need certain Java EE features beyond the Servlet API, you can easily enhance Tomcat by providing the required libraries as part of your application. For example, if you need JPA features you can include Hibernate or OpenEJB and JPA works nearly out of the box.

How to decide whether to use Tomcat or a full stack Java EE application server:

When starting your project you should have an idea what it requires. If you're in a large enterprise environment JBoss (or any other Java EE server) might be the right choice as it provides built-in support for e.g:

  1. JMS messaging for asynchronous integration
  2. Web Services engine (JAX-WS and/or JAX-RS)
  3. Management capabilities like JMX and a scripted administration interface
  4. Advanced security, e.g. out-of-the-box integration with 3rd party directories
  5. EAR file instead of "only" WAR file support
  6. all the other "great" Java EE features I can't remember :-)

In my opinion Tomcat is a very good fit if it comes to web centric, user facing applications. If backend integration comes into play, a Java EE application server should be (at least) considered. Last but not least, migrating a WAR developed for Tomcat to JBoss should be a 1 day excercise.

Second, you should also take the usage inside your environment into account. In case your organization already runs say 1,000 JBoss instances, you might always go with that regardless of your concrete requirements (consider aspects like cost for operations or upskilling). Of course, this applies vice versa.

my 2 cent


Take a look at TOMEE

It has all the features that you need to build a complete Java EE app.


I'd certainly look to TomEE since the idea behind is to keep Tomcat bringing all the JavaEE 6 integration missing by default. That's a kind of very good compromise


Strictly speaking; With no Java EE features your app hardly need an appserver at all ;-)

Like others have pointed out JBoss has a (more or less) full Java EE stack while Tomcat is a webcontainer only. JBoss can be configured to only serve as a webcontainer as well, it'd then just be a thin wrapper around the included tomcat webcontainer. That way you could have an almost as lightweight JBoss, which would actually just be a thin "wrapper" around Tomcat. That would be almost as lightweigth.

If you won't need any of the extras JBoss has to offer, go for the one you're most comfortable with. Which is easiest to configure and maintain for you?


I have also read that for some servers one for example needs only annotate persistence contexts, but in some servers, the injection should be done manually.