-
1. Re: Using Weblogic JMS -- How to include the jar?
csmith72 Nov 24, 2010 12:14 PM (in response to csmith72)For anyone else encountering this issue, here is how I resolved it:
1) I used the Embed-Dependency instruction within my project's pom.xml file to embed the weblogic jar file, as described here:
2) I modified the generated MANIFEST.MF file so that the javax.jms package was no longer declared in the "Private-Package" section, meaning that my bundle would not load the javax.jms classes from the weblogic jar.
3) I added the javax.jms package to the "Import-Package" section of the manifest file so that the bundle would know to get those classes from the OSGI container just like all of the other bundles.
Once these steps were completed, my project has access to all of the necessary WebLogic classes without encountering conflicts with the JMS classes.
It may also be worth nothing that when embedding the weblogic jar within my bundle, there are a large number of extraneous import-package statements that get added to the manifest file. I wound up removing many of them manually, so that the final import-package section for my simple use-case looks like this:
Import-Package: org.apache.camel.builder, org.apache.camel.component.jms, org.apache.camel.model, org.apache.log4j, org.springframework.beans.factory;version="2.5", javax.jms, org.apache.activemq
Hopefully this helps anyone else attempting to publish JMS messages to WebLogic Server using ServiceMix.