So I did a quick test with JBoss 5.1 using the Native core and
JDK1.6.0_16 and CXF 2.2.3. I bundled all CXF jars in WEB-INF/lib and
configured the class-loader isolation of my previous e-mail. The
following jars caused linkage errors:
geronimo-activation_1.1_spec-1.0.2.jar
geronimo-servlet_2.5_spec-1.2.jar
geronimo-stax-api_1.0_spec-1.0.1.jar
jaxb-api-2.1.jar
jaxb-impl-2.1.12.jar
jaxb-xjc-2.1.12.jar
saaj-api-1.3.jar
saaj-impl-1.3.2.jar
After removing the above from WEB-INF/lib, my war worked in
JBoss-Native, JBoss-CXF and Tomcat. Needless to say, if you don't use a
JDK > 1.6.0_04, you mileage will vary.
Alexandros Karypidis wrote:
You might want to consider writing a couple of maven profiles and
distribute two packages. For example have a look at how Liferay
distributes several different bundles:
http://sourceforge.net/projects/lportal/files/Liferay%20Portal/5.2.3
If you really need to have a "universal package" though your only
option is to bundle CXF. I'd start by configuring class-loader
isolation in JBoss using a suitable jboss-web.xml. Have alook at
"Isolation with Overriding Server Classes" in
http://www.jboss.org/community/wiki/ClassLoadingconfiguration
|
|<jboss-web>|
| <class-loading java2ClassLoadingCompliance="false">
<loader-repository>
com.example:archive=unique-archive-name
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>|
| </loader-repository>|
</class-loading>
|
And take it from there....
Benson Margulies wrote:
Alexandros,
I've got to deliver the same webapp under naked tomcat and JBoss, so
I don't
think that the built-in integration is going to be practical.
--benson
On Tue, Nov 3, 2009 at 8:56 AM, Alexandros Karypidis
<[email protected]>wrote:
Benson Margulies wrote:
I've got a working webapp with CXF in it, and I must now deploy it on
JBoss.
Does someone have a recipe for dealing with whatever problems with
endorsed
jars and such are likely to come up?
Hi,
I'm also using CXF extensively with JBoss and I've found that the
best way
is to use the CXF integration layer provided by JBoss. If you look at
http://www.jboss.org/jbossws/ you'll see that JBoss provides 3
implementations of web services: Native, CXF and Metro. The server
passes
the J2EE TCK using both Native and CXF stacks and CXF is well
supported (in
fact, as far as I understand they intend to make it the default in the
future, which is why the pass the TCK with it and certify JBoss with
CXF as
well).
If you install jbossws-cxf-3.2.0 on top of your default JBoss 5.1 AS,
you'll see at startup:
...
15:41:28,625 INFO [WebService] Using RMI server codebase:
http://localhost:8183/
15:41:38,156 INFO [AbstractServerConfig] JBoss Web Services - CXF
Server
15:41:38,156 INFO [AbstractServerConfig] 3.2.0.GA
...
If you go down this route, CXF will be available at runtime and you
don't
even need to do put it in your war (the latest JBoss integration is
3.2.0
which bundles CXF 2.2.3). Your other option would be to bundle CXF
and its
dependencies in your war, configure class-loader isolation to make sure
things don't mix up with the default stack of JBoss (Native), etc.
For the CXF integration provided by JBoss there's a CXF user forum at
http://www.jboss.org/index.html?module=bb&op=viewforum&f=276 and
CXF-specific documentation at
http://www.jboss.org/community/wiki/JBossWS-StackCXFUserGuide
I haven't had major issues with the CXF integrated in JBoss (and in
fact
I'm doing some fancy stuff like using using WS-Addressing,
WS-ReliableMessaging, decoupled endpoints, etc).
If you run into a specific problem post here (or better at the
JBoss-CXF
forum if you decide to use the JBoss integration like I described
above) and
I'll gladly try to help out if I can (I follow the list and the
forum). In
any case, even if it's beyond my knowledge, the people in the JBoss
forum
are very helpful and quick to reply.