felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: Question about accessing component dosgi
Date Fri, 01 Mar 2013 07:17:21 GMT
Hi Dhiego,

the ipojo example does not use zookeeper based discovery. It uses a 
static remote_services.xml file.
In case of zookeeper discovery this file would not be necessary.

So what you could try is run the ipojo example on Karaf like in my 
tutorial 
http://liquid-reality.de/display/liquid/2013/02/13/Apache+Karaf+Tutorial+Part+8+-+Distributed+OSGi

.

On the server side you just install the example on the first container. 
On the client side you leave out the remote_services file. I wonder if 
that makes a difference.

In any case I will also try to get the ipojo example working. I did not 
yet test it.

About @WebService and OSGi service. DOSGi allows to export plain OSGi 
services as webservices in this case it uses the CXF Simple front end 
and the Aegis data binding. When you add the @WebService annotation to 
the interface then it uses the JAX-WS frontend and the JAXB databinding 
by default.

So yes you can have one service impl act as an OSGi service and a web 
service. You only have to make sure your service design is suitable for 
remote communication. For example you can have very fine grained OSGi 
service calls as there is almost no additional overhead compared to a 
java method call.
If your service is intended for remote use it should be more coarse 
grained.

Christian

On 01.03.2013 00:47, Dhiego Abrantes de Oliveira Martins wrote:
> My code is equals to basic example in ipojo page:
> http://felix.apache.org/site/apache-felix-ipojo-dosgi.html
>   By default, ipojo dosgi is zookeeper based, right?
>
> The only change was @WebService annotation added in AdderService and
> AdderServiceProvider.
>
> One more question: A simple bundle can be a Service and a WebService at the
> same time?
> I mean: Does make sense implements a bundle that behaves as WebService to
> export it to another container, but I can use it as a "local" service?
>
> Can you share with us your test example?
>
> I'm think I'm confused about WebService as a bundle and distributed bundles.
>
> Best regards!
> __
> *Dhiego** **Abrantes*
>
>

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

Open Source Architect
http://www.talend.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message