2

I'm working in an infrastructure team(Jboss 4.02/Tomcat 5.5/Weblogic 8.1 servers)in my company...some of the weblogic java applications are moving to jboss/tomcat servers.So what are the criterias we need to consider whether we need to go for jboss or tomcat? which is the best option?

Thanks in Advance, Rakhesh

mikera
  • 105,238
  • 25
  • 256
  • 415
user749432
  • 21
  • 1
  • 2
  • See also [Why do people choose tomcat over a java EE compliant application server?](http://stackoverflow.com/q/11262617/190816) and [Besides EAR and EJB, what do I get from a Java EE app server that I don't get in a servlet container like Tomcat?](http://stackoverflow.com/q/269186/190816) – David Blevins Jul 24 '12 at 17:29

4 Answers4

5

The main difference is certainly the fact that JBoss is an application server and supports the full Java EE stack, while Tomcat is a servlet engine and supports only a small fraction of the APIs which are defined in Java EE.

So, your main criteria should be: Which APIs (Frontend, Business Logic, Persistence, Third-Party, ...) do you need?

You should not make this an easy decision. The fact that you are asking the question indicates that you probably did not have the chance to play around with both and familiarize yourself with the concepts behind Java Enterprise stacks (Java EE vs. Spring vs. DIY).

My advice would be to take the time to evaluate both system - it looks like you are able to use both.

  • If you don't need much, you're probably better off with Tomcat, which is small and easy to use, but can be a nightmare to configure if you need advanced functionality.
  • JBoss AS comes with a full and mature stack. Everything is just right in place and works fine - the price you'll have to pay is that it way bigger and will take longer to start / stop / redeploy.

But again: That's a serious decision with a high impact on pretty much everything...

Jan Groth
  • 14,039
  • 5
  • 40
  • 55
1

Both Tomcat and JBoss are very easy to install - simply unzip a file, and start it with a script. Both Tomcat and JBoss have great support for products like IDE's, monitoring tools, and such.

But in your migration case, JBoss is a better choice. Chances are your Web apps need JNDI data sources and JTA transactions - these things come built in to JBoss 4+, whereas you would have to graft them on to Tomcat 5.x, with much effort. You old WAR's will find JTA and JNDI data sources with no trouble on JBoss. Tomcat can indeed add these features, but JBoss packages them nicely into the system nicely. So even if you have no EJBs or JMS, then JBoss is still a good choice because many apps do need JTA and JNDI.

But of course if you find EAR files for your apps, then Tomcat will not work. And then JBoss will deploy the EAR files nicely.

Jay Meyer
  • 391
  • 3
  • 3
  • JNDI data sources work on Tomcat including connection pooling. If you just use local transactions you can do without JTA, see Spring's `DataSourceTransactionManager`. I'm not saying it's always the best solution but certainly possible. – Philippe Marschall Apr 25 '12 at 17:08
0

JBOSS uses Tomcat as its servlet/JSP engine, so it's JBOSS and Tomcat or WebLogic.

The answer depends on whether the original apps use EJBs or JMS services. If they do, you have to use JBOSS, because Tomcat doesn't support EJBs (unless you add OpenEJB) or JMS (unless you add something like RabbitMQ or OpenJMS).

If you don't use EJBs, and only have JSPs, JNDI data sources, and JDBC, then you can deploy your apps as WAR files on Tomcat and pass on the full Java EE stack altogether.

duffymo
  • 305,152
  • 44
  • 369
  • 561
  • the version of tomcat in jboss is a branch of version 6.0 called jboss web, so in a sense is a different entity to tomcat, albeit derived from the same source. – leonigmig Jan 20 '12 at 14:56
  • @duffymo - Are you sure Tomcat doesnt support JMS? I have seen applications running in Tomcat with ActiveMQ as the JMS provider. Is this not the same as Jboss 7 using HornetQ as its provider? – ziggy Mar 04 '12 at 16:40
  • Not without ActiveMQ. Tomcat, without adornment, is merely a servlet/JSP engine. But yes, you can even add OpenEJB and ActiveMQ and make it a complete Java EE app server. – duffymo Mar 04 '12 at 16:41
0

I think you should consider starting with different input data:

  • what are the applications requirements ?
  • what are the production constraints ?
  • which product suits well to the administration team?

Just write a matrix with the 2 products and those criteria and your choice will be done!!! Jboss is far more heavy than Tomcat but could offer some value added while putting the application in place ? Do you have some Nagios/Tivoli or any other SNMP management infrastructure ? in this case you can finnd easily SNMP adaptors providing proprietray MIBs to manage your JBoss server...JMX Beans in old releases are a very conveniant way to administer such tool

HTH Jerome

romje
  • 650
  • 3
  • 4