JBoss 5.1

View: New views
10 Messages — Rating Filter:   Alert me  

JBoss 5.1

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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?

Re: JBoss 5.1

by karypid :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.


Re: JBoss 5.1

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <akarypid@...>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.
>
>

Re: JBoss 5.1

by karypid :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <akarypid@...>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.
>>    

Re: JBoss 5.1

by karypid :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
>> <akarypid@...>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.
>>>    


Re: JBoss 5.1

by Alessio Soldano :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alexandros Karypidis wrote:

> 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.
Perhaps the linkage errors are due to the endorse mechanism that
basically cause the jaxb libs (and some other ones) to be loaded in the
bootstrap classloader (see the libs in jboss-home/lib/endorsed).
Cheers
Alessio

P.S. thanks for the support here :-)

--
Alessio Soldano
Web Service Lead, JBoss


Re: JBoss 5.1

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A few quick 'provided's, I hope, will accomplish this.

On Wed, Nov 4, 2009 at 4:05 AM, Alessio Soldano <asoldano@...> wrote:

> Alexandros Karypidis wrote:
>
>> 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.
>>
> Perhaps the linkage errors are due to the endorse mechanism that basically
> cause the jaxb libs (and some other ones) to be loaded in the bootstrap
> classloader (see the libs in jboss-home/lib/endorsed).
> Cheers
> Alessio
>
> P.S. thanks for the support here :-)
>
> --
> Alessio Soldano
> Web Service Lead, JBoss
>
>

Re: JBoss 5.1

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Could I check one more point about the 'just use yours' option? I thought
that I'd read that you are sticking with some other JAX-RS platform. Is the
CXF JAX-RS stuff in there? I use at least one CXF-specific bit of REST.

On Wed, Nov 4, 2009 at 4:05 AM, Alessio Soldano <asoldano@...> wrote:

> Alexandros Karypidis wrote:
>
>> 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.
>>
> Perhaps the linkage errors are due to the endorse mechanism that basically
> cause the jaxb libs (and some other ones) to be loaded in the bootstrap
> classloader (see the libs in jboss-home/lib/endorsed).
> Cheers
> Alessio
>
> P.S. thanks for the support here :-)
>
> --
> Alessio Soldano
> Web Service Lead, JBoss
>
>

Re: JBoss 5.1

by Sergey Beryozkin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is cxf-frontend-jaxrs included in WEB-INF/lib ? If so then I believe it should work
cxf-frontend-jaxrs ships with a META-INF/services/javax.ws.rs.ext.RuntimeDelegate extension which should be discovered and the
control should be given to the CXF JAXRS implementation....

cheers, Sergey

----- Original Message -----
From: "Benson Margulies" <bimargulies@...>
To: <users@...>
Sent: Wednesday, November 04, 2009 11:30 AM
Subject: Re: JBoss 5.1


> Could I check one more point about the 'just use yours' option? I thought
> that I'd read that you are sticking with some other JAX-RS platform. Is the
> CXF JAX-RS stuff in there? I use at least one CXF-specific bit of REST.
>
> On Wed, Nov 4, 2009 at 4:05 AM, Alessio Soldano <asoldano@...> wrote:
>
>> Alexandros Karypidis wrote:
>>
>>> 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.
>>>
>> Perhaps the linkage errors are due to the endorse mechanism that basically
>> cause the jaxb libs (and some other ones) to be loaded in the bootstrap
>> classloader (see the libs in jboss-home/lib/endorsed).
>> Cheers
>> Alessio
>>
>> P.S. thanks for the support here :-)
>>
>> --
>> Alessio Soldano
>> Web Service Lead, JBoss
>>
>>
>


Re: JBoss 5.1

by karypid :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm using the full-bundle (cxf.jar) from the binary distribution (2.2.3
specifically). I can see org.apache.cxf.jaxrs.XXX packages inside so I
suppose it's there. It means nothing though as any conflict would arise
at runtime and I never access this stuff in my test app (I don't do
JAX-RS). I guess you'll just have to try.

Sergey Beryozkin wrote:

> Is cxf-frontend-jaxrs included in WEB-INF/lib ? If so then I believe
> it should work
> cxf-frontend-jaxrs ships with a
> META-INF/services/javax.ws.rs.ext.RuntimeDelegate extension which
> should be discovered and the control should be given to the CXF JAXRS
> implementation....
>
> cheers, Sergey
>
> ----- Original Message ----- From: "Benson Margulies"
> <bimargulies@...>
> To: <users@...>
> Sent: Wednesday, November 04, 2009 11:30 AM
> Subject: Re: JBoss 5.1
>
>
>> Could I check one more point about the 'just use yours' option? I
>> thought
>> that I'd read that you are sticking with some other JAX-RS platform.
>> Is the
>> CXF JAX-RS stuff in there? I use at least one CXF-specific bit of REST.
>>
>> On Wed, Nov 4, 2009 at 4:05 AM, Alessio Soldano <asoldano@...>
>> wrote:
>>
>>> Alexandros Karypidis wrote:
>>>
>>>> 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.
>>>>
>>> Perhaps the linkage errors are due to the endorse mechanism that
>>> basically
>>> cause the jaxb libs (and some other ones) to be loaded in the bootstrap
>>> classloader (see the libs in jboss-home/lib/endorsed).
>>> Cheers
>>> Alessio
>>>
>>> P.S. thanks for the support here :-)
>>>
>>> --
>>> Alessio Soldano
>>> Web Service Lead, JBoss
>>>
>>>
>>