[tomcat] JBoss vs Tomcat again

This will appear to be the age old question (which it is :)) that which server is better between Tomcat and JBoss, but I have not found a good enough answer yet to solve my problem.

I know that Tomcat is only a servlet engine and JBoss offers many more functionalities out of the box, but what I fail to understand is why Tomcat is better to use in some situations than jboss. I read somewhere that JBoss has a pluggable architecture and if required, you can unplug features from JBoss to make it essentially a tomcat servlet container. If that is the case, then isn't it better to do so instead of using Tomcat, in order to leave scope for plugging things back.

Another explanation I find in favour of Tomcat is that it is lightweight, does that mean less memory requirement or does that also allows faster response. Again, I need to know that won't jboss load components as per requirement i.e. if i am using only servlets, then won't jboss skip the rest of the features and become lightweight automatically.

Essentially, my application does not have any Java EE features, but the 'lightweight' arguments in favour of Tomcat does not sound convincing enough because of the above mentioned reasons.

Please help.

Edit: We had finally decided to use tomcat back then and we have been using it for more than 6 months now with great ease of use. Infact we found some practical use where we could very easily run multiple tomcat instances on the same server machine for different developers, the same could have been very difficult with jboss.

I have found tomcat to be hassle free for our work and therefore may be the right choice when you are not using much of Java EE features. PS: Please note that we still use Spring and Hibernate with Tomcat

This question is related to tomcat jboss

The answer is


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.


Take a look at TOMEE

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


Examples related to tomcat

Jersey stopped working with InjectionManagerFactory not found The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat Spring boot: Unable to start embedded Tomcat servlet container Tomcat 404 error: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists Spring Boot application in eclipse, the Tomcat connector configured to listen on port XXXX failed to start Kill tomcat service running on any port, Windows Tomcat 8 is not able to handle get request with '|' in query parameters? 8080 port already taken issue when trying to redeploy project from Spring Tool Suite IDE 403 Access Denied on Tomcat 8 Manager App without prompting for user/password Difference between Xms and Xmx and XX:MaxPermSize

Examples related to jboss

How to enable TLS 1.2 in Java 7 Jboss server error : Failed to start service jboss.deployment.unit."jbpm-console.war" SQLException: No suitable Driver Found for jdbc:oracle:thin:@//localhost:1521/orcl PSQLException: current transaction is aborted, commands ignored until end of transaction block JBoss AS 7: How to clean up tmp? How to deploy a war file in JBoss AS 7? How to increase heap size for jBoss server JBoss default password HTTP response header content disposition for attachments PersistenceContext EntityManager injection NullPointerException