We have migrated to JBoss from Tomcat+Equinox recently. There's a challenge to do the migration basically the documenation in jboss is a bit less than desired.
Here is the osgi subsystem in standalone.xml we finally use.
<subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="eager">
org.apache.log4j, org.apache.commons.logging, org.slf4j, javax.xml.bind.api
org.apache.log4j;version=1.2.15, org.apache.commons.logging;version=1.1.1, org.slf4j;version=1.6, javax.activation;version=1.1.1, javax.xml.bind;version=2.2, sun.security.provider;version=1.0
<capability name="org.apache.felix.log" startlevel="1"/>
<capability name="org.apache.felix.configadmin" startlevel="1"/>
<capability name="org.jboss.osgi.logging" startlevel="1"/>
<capability name="javax.ws.rs.api" startlevel="1"/>
<capability name="org.jboss.resteasy.resteasy-jaxrs" startlevel="3"/>
The first thing we discovered is we have to use JBoss' logging. It's well integrated, easy to use, but if you tried to deploy your own slf4j, log4j... it just won't work.
The 2nd thing is the org.jboss.osgi.system.modules.extra & org.osgi.framework.system.packages.extra, without them, some of the package are exported without version. And what you see here is a list of all that I can find on different blog posts or forum.
Also, there're two version of javax.servlet.api, one being javax.servlet.api:v25 and the one i've used here is for servlet api 3.0 which is required by resteasy.
We also use resteasy-jackson-provider, but the one in jboss module exported a package which "masks" the same package exported in resteasy-jaxrs. I've raised a JIRA about it. Meanwhile, i've repackaged the resteasy-jackson-provider so it won't export that package.
At last, jboss also comes with a jboss config admin integration, which will add the configurations to the configadmin subsystem in standalone.xml. However, it doesn't support list as value (Apache Felix FileInstall supports that). Thus, if you are using FileInstall, you'll have to disable the jboss config admin (by not adding the capability to osgi subsystem)
I'm trying to do the same, but using Apache Felix (and Karaf) instead of Eclipse Equinox. It is a nightmare, I have always not resolved dependencies!
hope you've resolved the dependencies by now. but it's in fact a complicated business, the crazy thing is what took me the most time is to setup the logging! different bundles (including thridparty) use different logging, slf4j, log4j, apache common logging... and if we wanted to have everything to use log4j as the real implementation, that's surprisingly hard to do in equinox. However, JBoss seems to do that really nice. my project has a requirement to use JBoss so i haven't try felix/karaf, I was hoping that would be easier.Delete