You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Gert Vanthienen <ge...@skynet.be> on 2008/11/03 07:12:03 UTC
Re: Can I route OSGi calls in SMX4?
Juan,
If you register an endpoint for your service in the NMR, you can access
it from you camel orchestration bundle. The camel-nmr shows you how
different Camel routes can communicate over the NMR, but you can connect
anything there. A service that has an endpoint registered on the NMR,
is not necessarily available for remote calls.
Whether or not you expose a service to remote calls, is entirely up to
you. Many applications only expose a few (web)services to the outside
world, while working with a lot of different services for the
implementation.
For the log: endpoint, that actually refers to a Camel component
(http://activemq.apache.org/camel/log.html) which uses the
commons-logging API. The only thing OSGi does here is provide the
classes from the logging bundle to the camel-core bundle. If this is
what you want to, just take a look at any components in Camel for an
example.
Regards,
Gert
Juan F. Valdés wrote:
> I'm reviewing EIP osgi documentation and camel-osgi example and I have a
> doubt.
>
> I want to develop one bundle that orchestrates request calling services from
> other bundles, and I would like to intercept those calls with camel, it is
> posible?
>
> I think probably I will have to register an endpoint for my service in NMR,
> but, If I do so, have i to expose the service to remote calls? (with cxf or
> jms bc), I don't want that.
>
> I saw there is a destination endpoint called log:ExampleRouter in camel-osgi
> example that references Commons logging Bundle. It seems that it is a kind
> of logical link between osgi and NMR endpoint and could be what I need for
> my application, ¿how can i do that for my bundles?
>
> Thanks In Advance,
>
> Juan.
>
Re: Can I route OSGi calls in SMX4?
Posted by "Juan F. Valdés" <jf...@atsistemas.com>.
Hi Gert,
First of all, thank you so much for helping me. Now I have a better
understanding of NMR.
Gert Vanthienen wrote:
>
>
> If you register an endpoint for your service in the NMR, you can access
> it from you camel orchestration bundle. The camel-nmr shows you how
> different Camel routes can communicate over the NMR, but you can connect
> anything there. A service that has an endpoint registered on the NMR,
> is not necessarily available for remote calls.
>
But, how can I register an endpoint for my OSGi service?
I mean, in camel-nmr example "nmr:ExampleRouter" endpoint is implicitly
created by NMR Component, but i need to link a NMR endpoint with my service,
a simple HelloWorld OSGi service:
<osgi:service interface="com.santalucia.esb.primer.osgi.HolaMundoOSGi" >
<bean id="holaMundoBean"
class="com.santalucia.esb.primer.osgi.HolaMundoOSGiImpl">
<property name="mensaje"><value>Hola Mundo OSGi</value></property>
</bean>
</osgi:service>
I could use
http://fusesource.com/docs/esb/4.0/fsf_se/ESBFSFSEDeployService.html
EndpointExporter to expose the bundle as a JBI Service Unit, and use the
JBI endpoint in the orchestration bundle through NMR, but I think there is a
simpler way (without JBI) to do it, it is possible?
I had thought camel log component used the NMR-OSGi linking i was looking
for but I realized it's a native Camel component
Cheers,
Juan
--
View this message in context: http://www.nabble.com/Can-I-route-OSGi-calls-in-SMX4--tp20262134p20303228.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.