Question

I have a simple java application which I deploy as an EAR on IBM WebSphere Application Server 6.1

My question is simple: Is it possible to export an EAR that would be capable of running on both WAS 6.1 and WAS 7 ? We have managed to create JARs that connect to version-dedicated EARs without any problem. But is it possible to make the whole EAR multi-version compatible?

The necessity for this is such: Recently, a directive from on high was issued to advance from WAS 6.1 to WAS 7. Wishing to stay compliant, and not cost the company large sums of money, my team has begun migrating our services to WebSphere Application Server 7.

Unfortunately, due to the way our product is distributed, while some Business Applications call us directly and would not be affected at all (or even in the know) of the change, others have to deploy their own EAR. Problems start cropping up when it becomes obvious that they are not as gung-ho about switching to WAS 7 as we are - or they are simply not able to do it in much of a timely manner.

Was it helpful?

Solution

After playing with the project settings for the last few days, I managed to distribute the EAR to both WAS6.1 and WAS7. I can't say for certain what it was precisely that got everything working but I know one main thing was to have the Target Runtime set to both WAS6.1 and WAS7. I did seem to have some problems where some of the projects had been changed to work with WAS7 and didn't show any problems in build targeting both runtimes until I ran it on WAS6.1. Then some annotation problems cropped up when I removed WAS7 as a target runtime. One annotation problem I encountered was that, because WAS6.1 runs on java 1.5, I had errors caused by some @Override annotations on a class which only implemented an interface... so either way I'm glad I found that. Apparently, java 1.6 doesn't care and just lets you override nothing.

Anyway, basically a simply matter of configuring the facets and target runtimes correctly, and making sure that the EAR and sub projects work with each, and not just both.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top