Tomcat or Jboss/Glassfish?

Asked

Viewed 2,924 times

7

What requirements should I evaluate to define which application server will support my application?

I know that Tomcat is not a Full JEE server, but what defines an application for it to need to use a server like this? So far all the Java applications I’ve worked with have been supported by Tomcat.

1 answer

8


The differences begin in the nomenclature, we call those of the Tomcat category of web server and others as Jboss and Glassfish of container. A container usually adds more functionality than the basic specification of a web server. For example: administration interfaces, connection pools, load balancing, are functionalities that are already ready and available in general containers that will not require much extra administrator knowledge to make them work. In addition, they already have a set of pre-installed libraries, many of them related to these services that are approved by the server. Simple example: In Tomcat when you need to use JPA for example, you will have to include the libraries (defining their versions) of the vendors as Hibernate, Eclipselink, etc. In the case of Jboss it already has Hibernate as the default and no need to include itlas via application. In practice, what happens is that the container manages the libraries and thus ensures their functionality and compatibility. If you have more than one application on the same server they will be using the same version of each library provided by the container.

Until recently, by "climbing" all services on startup, Jboss was much slower to start than Tomcat. On the other hand, the first access to the application in Tomcat would be slower than in Jboss, because the services start together with the application. Currently in Jboss 7.x or Wildfly 8.x the services are initialized on demand, as required by the application. So the justification of Tomcat being "fast and light" is not exactly valid for all cases.

A basic requirement that you would use to choose a server, in addition to the level of knowledge about each of them of course, is the need for your application for the services that each one offers. For example, if you are going to do a load balancing in a container you can do this quite trivially using the administration interfaces. So, you should list what features your application needs and check if you need a server or container.

  • So using Tomcat doesn’t mean I won’t be able to use some Java technology, I’ll just have more work adding it to the Tomcat library, that’s it?

  • 1

    Yes. But it can happen that some technology does not adapt as well as in the case of containers. Because in containers,who includes the technologies are the developers of the product itself and if necessary can modify it. Already in the servers as Tomcat they do not have this commitment. Inclusive, in the beginning Jboss was a kind of extension of Tomcat itself. The core was Tomcat and the other services were added by Jboss. Over time, Jboss chose to develop the complete solution pro.

  • Thank you, Saito!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.