Do I need JBoss?

Recently I have been asked, "Why you need JBoss if Tomcat and Spring already give you the stuff for Web application development?".Hmm… Good question. I have kept using JBoss as I used to do EJB development and I found JBoss is a great open source application server. Later, I adopted Spring POJO container and dropped EJB. However, I still continue to use JBoss because Spring will happily live within a JBoss-deployed WAR. So, I never ask myself this question. OK, let me step back and think over what else JBoss provides me apart from EJB support.

Here is the list I come out that I may use JBoss for:

  1. JMX Container
  2. Deployment Lifecycle and Deployment
  3. Transaction Manager
  4. EAR deployment/ Classloading Architecture
  5. MDB
  6. Distributed architecture and clustering capabilities

Here is what I use Spring for:

  1. IoC (Service Configuration, including Hibernate)
  2. AOP
  3. Integration Testing Framework
  4. Transaction Demarcation
  5. JDBC Template
  6. Spring Acegi Security Framework
  7. Spring Remoting – Hessian, Web Service…

How I move away from JBoss

Now, let me see whether I can live without JBoss. Here is what I can do if I move away from JBoss.

  1. JMX Container -> I will expose it via Spring and have JConsole from JDK to monitor it.
  2. Deployment Lifecycle and Deployment -> This one I am not sure
  3. Transaction Manager -> I will use the one provided by Spring. I am not sure which one is better.
  4. EAR deployment/ Classloading Architecture -> I will do WAR deployment only.
  5. Message-driven bean -> I will use Message-Driven POJO on top of ActiveMQ
  6. Clustering -> Tomcat v5 now has clustering and session replication support

How do I feel after that

In conclusion, for simplicity, I believe I am good to move away from JBoss for my web application development. There are other benefits that drive me to move away from JBoss. Here are the list:

  1. Shorter load and start up time for Tomcat. JBoss takes 2 minutes to start up whereas Tomcat will load in a matter of seconds.
  2. Less memory consumption for Tomcat.
  3. Classloading in Tomcat is standard.

However, there are some areas I want to point out after I dropped EJB and go purely on POJO. Using Spring remoting is lightweighted. However EJB remoting has its own strength in terms of distributed transaction management. Without EJB, there is no distributed rollback. Follow up: I have found an article showing me how to do distribute transaction with Spring alone. I put the article reference below.

Reference

XA transaction using Spring http://www.javaworld.com/javaworld/jw-04-2007/jw-04-xa.html?page=1

Leave a comment

0 Comments.

Leave a Reply

You must be logged in to post a comment.