Once again, I am involved in a project that is upgrading jboss 4 to 5.
I definitely realize that JBoss 4, 5 and 6 are no longer maintained at all (no bug fixes unless you do them yourself on your own private branch). But none-the-less, business-wise it may possibly make sense to move to JBoss 5.
I have started on an upgrade guide for upgrading JBoss 4 to 5 that I hope everyone can find useful.
Below is what I have so far. Can anyone please add their input based on their previous experiences with going through this process?
JBoss AS4 to AS5 Upgrade Guide
This is an upgrade guide specifically for those who are going from JBoss Application Server version 4.x, and upgrading to JBoss Application Server 5.x. The latest and final GA release for the JBoss 5 version is jboss-5.1.0.GA., and this guide assumes this is the version you are upgrading to.
JBoss AS4 to AS5 - Good Idea?
The interesting part of this upgrade manual is that it's being written for a version that is already several releases past. We are all the way to AS7. This, of course, means we need a section dedicated to whether or not upgrading is even a good idea at all, or would it make more sense to go to the latest version.
So if you are thinking about upgrading your JBoss AS4 to AS5, make sure you have asked yourself if this the best move to make.
Start a meeting pulling in all the Java/JBoss architects that have been involved in the JBoss 4 "situation." In this meeting, create a list consisting of all the reasons your team wants to upgrade. What features in JBoss 5.1.0.Final are prompting you to move from AS4 to AS5?
Here are things to keep in mind when determining if the port from AS4 to AS5 is a smart idea:
- JBoss 5 uses more RAM than JBoss 4. So if you are looking for more efficient RAM utilization, you aren't going to get it..
- EJB3 capabilities are better in JBoss 5 than JBoss 4. This is one of the main reasons people would consider upgrading to AS5.
- If you are moving to AS5, why aren't you going to AS6? AS6 is basically an improved AS5. Keep in mind that in the case of AS5 versus AS6, there really isn't that much more work getting something to work in one versus the other. Take a look as the AS6 release notes.
- You do NOT need to move to AS5 or later to use HornetQ or another alternate messaging system. You can get most of those working on AS4.
[There are more reasons, community please add to this list!]
Another important factor is whether you are upgrading to a
community version or to an enterprise version.
JBoss AS4, AS5 and AS6 community editions are all no longer supported. So if you report a bug you find when
moving from AS4 to AS5... the Jboss community will simply be like "Yeah I know it's broken, upgrade to the latest JBoss."
At that point you would either have to find a work-around for the issue, or if that is not possible then you would have to create your own private branch and make a fix yourself. This is obviously not recommended mainly because such patches are not easily supported in the future. When you try to move to yet another later version of JBoss, those patches you applied might come to bite you.
Start out by giving the Red Hat support policy a once-over and understand what to expect from the RedHat.
- AS4.3 has only Mantenance Support until Jan 2013 (4.2 is outdated)
- AS5 Full support Nov 2012, Maintenance Nov 2016
- AS6 Full support Jun 2016, Maintenance Jun 2019
- Under a special subscription you might have 3 extra years 'Extended Life support'. (But remember Maintenance/Extended is only for limited bugfixing. You will not get new features, improvements, etc.)
So if you use AS5 you STILL might run into an issue where you have the need to upgrade for features (i.e. EE6).
JBoss 4.x to JBoss 5.x upgrade considerations
So there you go! I warned you! Don't upgrade to JBoss 5.x unless you know it's for sure what you want to do!
I’ve done four major Jboss4 to Jboss5 upgrades in my career. These upgrades have taught me that the migration process is pretty complicated, and that a “how-to” guide for how to upgrade won't be straight forward. This is because
- Jboss is historically not exactly well-documented (thus no official Jboss4 to 5 official migration documentation exists)
- Your migration process will be greatly simplified the simpler your web application is. The more JBoss4 features you are using… the more work it will be to move to a later version of JBoss. Many of the steps in a full blown migration guide would be skipped if such a guide existed because not many people utilize 100% of the features Jboss4 has to offer.
So what will we use to create an upgrade guide? Answer: We’ll use the Jboss 5.1.0.GA release notes , the Jboss issue tracker , and all community forum posts we can Google up related to struggles others went through when they did their application upgrades.
Get a list of the particular JBoss features you use
The migration process usually starts with a simple research task:
- For each web application being run on JBoss4, create a list of each JBoss feature being utilized
This might seem kind of silly at first... but realize the goal is to answer this question:
Pretend your applications are running on Tomcat5 alone, not on JBoss4. What extra features would you need to add to your application to get this to work on standalone Tomcat?
Why do this? Because JBoss4 and JBoss5 are built on top of Tomcat as their web container, upgrading JBoss4 to JBoss5 will involve getting a list of each JBoss 4 features you are using that Tomcat did not provide you, and going through the JBoss5 equivalent feature. If any of these features have changed from JBoss 4 to 5, then obviously you will need to make changes to fix the issue. It might even be the case that a feature that used to exist in JBoss4 has been completely refactored out of JBoss 5.
An example list of JBoss4 features my application might look like this:
- JBoss security domains
- SSO custom tailored to our company
- Security roles imported from LDAP integration
- JBoss Web Services from JBossWS
- Jboss messaging functionality using JBossMQ
- Clustering services
Researching the Jboss 5 release notes
Once you have a list of all the JBoss features that you are utilizing, you will need to research the release notes to gather all relevant changes that have occurred that might affect your web applications on Jboss 5.
For example, let’s say one of the Jboss4 features I am using is EJB3. I will then open up the jboss 5.1.0.GA/readme.html file and then search for “ejb.”
As a result of my search, I find the following modifications have been made that have a potential to affect my Jboss 4 EJBs:
- If using proprietary JBoss/EJB3 annotations, those have moved (since Beta4) into the org.jboss.ejb3.annotation package, EJBTHREE-1099. Those are now included in a new artifact, jboss-ejb3-ext-api.jar
- Interoperating with previous JBoss EJB3 implementations may present problems due to serialVersionUIDs issues, EJBTHREE-1118.
- JBoss 5 is stricter when it comes to verifying/deploying JavaEE artifacts. EJB3 deployments that run in AS 4.2 may fail in AS5. We have tried to keep the validation messages as accurate as possible in order to help you modify your deployment descriptors/annotations to be in-line with the JavaEE 5 requirements.
- File system layout for Jboss 5’s ejb deployer resources have been changed. Note deploy versus deployers:
Jboss 4.2.3.GA: C:\Jboss\jboss-4.2.3.GA\server\all\deploy\ejb3.deployer
Jboss 5.1.0.GA: C:\Jboss\jboss-5.1.0.GA\server\all\deployers\ejb3.deployer
- EJB3 configuration is now controlled by deployers/ejb3.deployer/META-INF/ejb3-deployers-jboss-beans.xml. For more details check out this wiki page.
- EJB was upgraded to 1.1.5.
So I would then go through this list and make appropriate changes before even trying to deploy the Jboss5 system.
Spring2 and JBoss5 VFS don't play well together
Spring2 has one big problem with JBoss5 that it did not have in JBoss4: http://jira.springframework.org/browse/SPR-5120
As a part of this effort, we decided to upgrade Spring2 to Spring3... however, it isn't necessarily needed. We have plenty of JBoss5 + Spring2 apps running in production, but you will be forced to specify each application context instead of using wildcards.
 JBoss 5.1.0.GA Release Notes* - http://anonsvn.jboss.org/repos/jbossas/tags/JBoss_5_1_0_GA/build/docs/readme.html#Other
 Migration Tips when upgrading from JBoss 4 to 5 - http://www.ibm.com/developerworks/java/library/x-tipjb5ejb3/index.html
 Upgrading JBoss 4 to JBoss5 with Java5 to Java6 - http://jvalentino.blogspot.com/2011/12/upgrading-jboss-4-to-jboss-5-with-java.html
 The Jboss issue tracker - https://issues.jboss.org/browse/JBAS
 JBoss 6.1.0.Final release notes** - https://community.jboss.org/wiki/AS610FinalReleaseNotes
* This is also available in your Jboss5 installation at: jboss-5.1.0.GA/readme.html file. This shows all the changes made from version 4 to version 5.
** This is also available in your Jboss6 installation at: jboss-6.1.0.GA/readme.html file. This shows all the changes made from version 5 to version 6.