I am using Jersey 2 to implement JAR-RS 2.0 in an IBM WebSphere 8.5 environment.
After reading this post JAX-RS Jersey 2.10 support in Websphere 8 I managed to get this working.
However, is it possible to bundle the JAX-RS Jars within the WAR and deploy the application without the need to create an isolated shared library? If this is not possible, can someone please explain why this is the case?
I understand the deployment time advantage of having the Jars in a library, but I would prefer to build the entire application including dependencies into a single WAR.
-- EDIT --
It appears that you can load the JAX-RS jars from within the WAR if you change the class loading order. You need to change the order to load classes parent last. This can be done as follows;
In the admin console:
Applications -> WebSphere enterprise applications -> {your.application} -> Manage Modules -> {your.module}
Change the Class loader order dropdown to: "Classes loaded with local class loader first (parent last)".
This however suggests that some JVM properties are missing from the attached Stackoverflow article.
Can anyone shed some light on the situation?
It appears that you can load the JAX-RS jars from within the WAR if you change the class loading order. You need to change the order to load classes parent last. This can be done as follows;
In the admin console:
Applications -> WebSphere enterprise applications -> {your.application} -> Manage Modules -> {your.module}
Change the Class loader order dropdown to: "Classes loaded with local class loader first (parent last)".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With