Re: question on cxf bus creation in Karaf

2019-11-12 Thread Scott Lewis



On 11/12/2019 7:05 AM, Jean-Baptiste Onofré wrote:

Hi,

in Karaf Cave, I created the bus programmatically and injected in the
CXF servlet.


Where in the Cave source code is this done?  I'm doing a similar thing 
with the CXFNonSpringJaxrsServlet, but the strange thing is that it's 
not working as expected in Karaf...while my version works fine in 
non-Karaf OSGi environment.


Thanks,

Scott




Re: question on cxf bus creation in Karaf

2019-11-12 Thread Jean-Baptiste Onofré
Hi,

in Karaf Cave, I created the bus programmatically and injected in the
CXF servlet.

It works fine. You can use the default "global" bus, or create one bus
per servlet, up to you.

Regards
JB

On 12/11/2019 15:56, Ranx0r0x wrote:
> Scott,
> 
> That's why I was a bit hesitant to answer the question about how to create a
> Bus. While blueprint is a common way to do it, it isn't universal and its
> implementation is actually a BlueprintBus which implements the Bus
> interface.
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: question on cxf bus creation in Karaf

2019-11-12 Thread Ranx0r0x
Scott,

That's why I was a bit hesitant to answer the question about how to create a
Bus. While blueprint is a common way to do it, it isn't universal and its
implementation is actually a BlueprintBus which implements the Bus
interface.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: question on cxf bus creation in Karaf

2019-11-11 Thread Scott Lewis

Hi,

On 11/11/2019 2:25 PM, Christian Schneider wrote:

Karaf has no direct dependency to CXF. So there is no special handling.
CXF has some implicit rules about bus creation though. As far as I 
recall it creates a single bus if you do not specifically set a bus by 
hand,


The confusing thing:  I have code that creates multiple CXF 
busses...that works fine when run in equinox (not all of Karaf) [1].  
But it doesn't work the same way in Karaf 4.2.6.   I got the code from 
JB's question about creating multiple servlets in CXF (on cxf list) a 
few weeks ago.


Scott

[1] 
https://github.com/ECF/JaxRSProviders/blob/master/bundles/org.eclipse.ecf.provider.cxf.server/src/org/eclipse/ecf/provider/cxf/server/CXFJaxRSServerContainer.java#L42




I propose to ask this on the CXF list.

Christian


Am Mi., 6. Nov. 2019 um 03:08 Uhr schrieb Scott Lewis 
mailto:sle...@composent.com>>:


I have some code running in a non-Karaf OSGi framework (e.g. equinox
framework with bundles) that creates and uses multiple CXF Bus
instances...in order to register multiple
CXFNonSpringJaxrsServlets that
are isolated from one another.

When run in Karaf with CXF 3.3.4, however, this code does not work
the
same...and I suspect it has something to do with how busses are
created
and used in Karaf.   I noticed there are a few Karaf commands (e.g.
cxf:list-busses) but I don't see from the documentation how cxf
busses
are created/added at runtime.

Any insights about what is different about CXF in Karaf as opposed to
plain 'ol OSGi framework?  Any docs on using/configuring/extending
CXF
in Karaf specifically?

Thanksinadvance,

Scott




--
--
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com



Re: question on cxf bus creation in Karaf

2019-11-11 Thread francois.papon
Hi Scott,Here an example on how to create a 
bus:https://github.com/apache/karaf-cave/blob/master/gateway/service/src/main/java/org/apache/karaf/cave/gateway/service/rest/FeaturesGatewayRestService.javaregards,Envoyé
 depuis mon smartphone Samsung Galaxy.
 Message d'origine De : Scott Lewis  Date 
: 12/11/2019  06:47  (GMT+01:00) À : user@karaf.apache.org Objet : Re: question 
on cxf bus creation in Karaf Howdy.  Not using blueprint.  How is bus creation 
done programmatically?On 11/11/2019 11:53 AM, Ranx0r0x wrote:> Usually you just 
add it in the Blueprint bundle. Something like:>> >> That depends on the use case. You may not even be using 
Blueprint so that> might not be relevant.>>>> --> Sent from: 
http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: question on cxf bus creation in Karaf

2019-11-11 Thread Scott Lewis

Howdy.  Not using blueprint.  How is bus creation done programmatically?

On 11/11/2019 11:53 AM, Ranx0r0x wrote:

Usually you just add it in the Blueprint bundle. Something like:



That depends on the use case. You may not even be using Blueprint so that
might not be relevant.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


Re: question on cxf bus creation in Karaf

2019-11-11 Thread Christian Schneider
Karaf has no direct dependency to CXF. So there is no special handling.
CXF has some implicit rules about bus creation though. As far as I recall
it creates a single bus if you do not specifically set a bus by hand,

I propose to ask this on the CXF list.

Christian


Am Mi., 6. Nov. 2019 um 03:08 Uhr schrieb Scott Lewis :

> I have some code running in a non-Karaf OSGi framework (e.g. equinox
> framework with bundles) that creates and uses multiple CXF Bus
> instances...in order to register multiple CXFNonSpringJaxrsServlets that
> are isolated from one another.
>
> When run in Karaf with CXF 3.3.4, however, this code does not work the
> same...and I suspect it has something to do with how busses are created
> and used in Karaf.   I noticed there are a few Karaf commands (e.g.
> cxf:list-busses) but I don't see from the documentation how cxf busses
> are created/added at runtime.
>
> Any insights about what is different about CXF in Karaf as opposed to
> plain 'ol OSGi framework?  Any docs on using/configuring/extending CXF
> in Karaf specifically?
>
> Thanksinadvance,
>
> Scott
>
>
>

-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com


Re: question on cxf bus creation in Karaf

2019-11-11 Thread Ranx0r0x
Usually you just add it in the Blueprint bundle. Something like:



That depends on the use case. You may not even be using Blueprint so that
might not be relevant.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html