How to set classpath for external jars while MDB deployment - Websphere
This is a discussion on How to set classpath for external jars while MDB deployment - Websphere ; Hi,
I developed a MDB which uses some external JARs. Those jars are present in folder called lib under the same project. At development time in WSAD5.1, I set the classpath in Environment at server level and I could test ...
-
How to set classpath for external jars while MDB deployment
Hi,
I developed a MDB which uses some external JARs. Those jars are present in folder called lib under the same project. At development time in WSAD5.1, I set the classpath in Environment at server level and I could test my application successfully.
Now I want to deploy the application in WAS. How do I deal with this issue?
Is there any way that I can set this classpath while creating EAR? OR I have to set this seperately in WAS?
When I created the EAR for my MDB application, it created a jar file. And that jar file contains that lib folder which contains those external JARs. How do I link those jars?
I need guideline to resolve this problem.
Thanks in advance.
Warm Regards,
Samir
-
Re: How to set classpath for external jars while MDB deployment
Hi, you have a couple of options. You can use a global library but I
have found this to be a bit problematic because sometimes you need to
uninstall and reinstall an application on WAS and you lose the
reference. You can also put the jar file in the lib folder in the EAR
and it will be available to the application. Or, you can leave it in
the lib folder of the project that references it like you have it now.
I hope that helps answer your question.
-
Re: How to set classpath for external jars while MDB deployment
Chad wrote:
> Hi, you have a couple of options. You can use a global library but I
> have found this to be a bit problematic because sometimes you need to
> uninstall and reinstall an application on WAS and you lose the
> reference. You can also put the jar file in the lib folder in the EAR
> and it will be available to the application. Or, you can leave it in
> the lib folder of the project that references it like you have it now.
> I hope that helps answer your question.
Hello, The J2EE specification suggests the recommended approach is to
package the jar within the EAR along side the MDB EJB jar. The MDB jar
would have a classpath entry for the common jars in the manifest to get
it on the MDB's classpath.
The global library option is problematic for many reasons. And I don't
think the packaging it in the MDB jar will work either (JAR in a JAR?),
at least not without a special classpath flag which will affect
anything else running in the same JVM (all apps running in the same JVM
must conform to the same version of all shared components). Besides
being outside of J2EE, that's not a desirable configuration for the
long-term, sooner or later you'll want to fix or upgrade one of those
common components and you'll have to test everything.
Packaged inside the EAR, it will be available to your application and
you're application only.
-
Re: How to set classpath for external jars while MDB deployment
Hi,
Are you able to reolve this problem. If yes, than plz share the solution.
Thanks,