I have an application where we have 3 EJB Jar files, 2 Utility Jar Files and 1 War file. We have inter dependencies between the EJB Jar and Utility Jar files. In WSAD, there is an option for us to package all the utility, EJB and WAR files into an EAR file using some zip creation utility. This worked fine on WSAD Test Environment but when we are trying to deploy this application on WAS 4.0.2, the Utility classes and EJB classes are not able to refer to each other. I have read that the "APPLICATION" visibility in WAS 4.0.2 allows us to do this since I have all the Jars in the EAR file.....Has anyone solved this problem ?? Please let me know...
This however works when we give dependencies in the Manifest File but that would mean we are giving "MODULE" visibility......
Try this open WAS Admin Console --> Highligh your Application server --> Click on JVM Settings tab --> Click Add under "System Properties" and add this line exactly
COM.ibm.ws.classloader.J2EEApplicationMode = true
and click Apply and restart application server.
it will works Good luck.
Srinivasa R Murarisetty
Are the utility Java classes using the EJBs? If so, the ZIP creation plugin will not help you there. The only reason they are working in WSAD, perhaps because the default visbility is Application.
I would make a clean separation of utility classes
1. The ones that do not use any EJB. Other EJBs use them. Move these classes in a separate Java project. Or move them within the EJB module.
2. The ones that use EJB. Move them within the EJB module or a Web Module.
Doing so will give you 100% J2EE conformance. The app will work with any visibility.
Thank you guys for your thoughts.
We are using WAS 4.0.2 and the new J2EE Application Visibility does not seem to be available in it...We have tried doing that but WAS doesnt pick it up...So, we have to go with the old visibilities.
The normal JARs with utility classes access the EJB JARs even in WAS if we package the utility JARs and EJBs in an EAR by specifying their dependencies in the Manifest file..So, that part is working. I wanted to know if we could achieve this kind of communication between the utility JARs, EJB JARs and WARs without having an entry in the Manifest file just by specifying the Visibility in WAS.
I would really appreciate any more thoughts...