In Websphere 3.5, we can specify classpath in the
application server level and all the common classes would
be visible to the EJBs.
However, In migrating the EJBs (SessionBean) from Websphere 3.5 to Webpshere 4.0, we found that the common classes (used by the EJBs) are needed to be included in the ejb jar or specified as classpath in the manifest.mf of the ejb jar. Visbility settings in the app server can't fix
Is there any method to fix the problem?
There r several ways to hold ur helper classes in the WebSphere classpath.
- One way as in case of 3.5 is to put ur jars in the WebSphere classpath. One way to dod that is from the adminconsole. Click on the JVM tab for a app server and u can specify the classpath.
- the second way is to drop ur class file/jar in the "classes" or "lib" folder.
- the other way, which is the best and most appropriative is what u have done. manifest the helper jars in the ejb.jar files. Which makes sure ur application helper files are visible only to ur application and no other application(.ear) installed on ur app server.
Make sure that visibility is set to application level.