Hi Angelo
On 08/06/12 09:06, Angelo zerr wrote:
Hi CXF Team,
I'm writing article about DOSGi + ServletBridge to create a WAR with DOSGi
bundles+JAX-RS Services and deploy it with Web Server which doesn't support
OSGi.
To manage that I use the "org.apache.cxf.rs.httpservice.context" property
to register the servlet with HttpServices which works with ServletBridge
well :
---------------------------------------------------------------------------------------------------------------------------
<entry key="org.apache.cxf.rs.httpservice.context" value="/UserService" />
---------------------------------------------------------------------------------------------------------------------------
But I would like manage with the same bundle the 2 configuration (only OSGi
container with OSGi Jetty, and ServletBridge)
To manage that I thought create an OSGi frgament which populate the value
of org.apache.cxf.rs.httpservice.context
---------------------------------------------------------------------------------------------------------------------------
<entry key="org.apache.cxf.rs.httpservice.context" value="${context}" />
---------------------------------------------------------------------------------------------------------------------------
For "ServletBridge" the fragment contains the property
---------------------------------------------------------------------------------------------------------------------------
context=/UserService
---------------------------------------------------------------------------------------------------------------------------
For " OSGi container with OSGi Jetty" the fragment contains the property
---------------------------------------------------------------------------------------------------------------------------
context=
---------------------------------------------------------------------------------------------------------------------------
And I thought DOSGi will not register teh service with HttpServices, but it
doesn't work.
Have you an idea how to manage the 2 configuration (with and without
HttpServices) with the same declaration of teh service?
I think you should parameterize the property name too, example:
<entry key="${name}" value="${value}" />
with
'org.apache.cxf.rs.httpservice.context' and "/UserService" used in one
case and 'org.apache.cxf.rs.address' and "http://host:port/context" used
in the other case
Cheers, Sergey
Many thanks for your help.
Regards Angelo
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com