You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by rpigeyre <rp...@gmail.com> on 2015/11/23 23:39:23 UTC

Proxy camel endpoint with blueprint

Hi,

I have two bundles which have to communicate each other using osgi service .
Both of the two bundles are using a camel integration route.

I don't want to use direct-vm to link the two routes ofthe two camelcontext
(in order to use cellar to distribute service on an other jvm through
DOSGI).

Here are my two blueprint context and camelContext :

Bundle A :
<blueprint
        xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="
      http://www.osgi.org/xmlns/blueprint/v1.0.0
      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

    <reference id="uuidGeneratorService"
interface="com.anotherbundle.UuidGeneratorService"/>

    <service ref="directProxyExposure"
interface="org.apache.camel.ProxyOsgi"/>

    <camelContext id="server-proxy-context"
                  xmlns="http://camel.apache.org/schema/blueprint"
                 
xsi:schemaLocation="http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint-2.14.1.xsd"
                  useMDCLogging="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <proxy id="directProxyExposure" serviceUrl="direct:osgiProxy"
serviceInterface="org.apache.camel.ProxyOsgi"/>

        <route>
            <from uri="direct:osgiProxy"/>
            <log message="Method : " loggingLevel="ERROR"/>
            <to uri="bean:uuidGeneratorService?method=generateUuid"/>
        </route>

    </camelContext>

</blueprint>

Bundle B :
<?xml version="1.0" encoding="UTF-8"?>
<blueprint
    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
      http://www.osgi.org/xmlns/blueprint/v1.0.0
      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
	
	<reference id="directProxyRef" interface="org.apache.camel.ProxyOsgi" />
	
	<camelContext id="client-proxy-context"
		xmlns="http://camel.apache.org/schema/blueprint"
 			xsi:schemaLocation="http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint-2.12.3.xsd"
 			useMDCLogging="true">
		<route>
			<from uri="jetty:http://0.0.0.0:8083/"/>
			<to uri="bean:directProxyRef?method=noUsageButUsefull" />
		  </route>
	</camelContext>

</blueprint>

My interface in bundle A :
public interface ProxyOsgi {

    void noUsageButUsefull();
}

While i'm running a request on http://localhost:8083, i can't see any result
of uuidGeneratorService and the log before this endpoint doesn't display
anything :

2015-11-23 23:27:26,075 | ERROR | tp1948309946-448 | route7                          
| ?
    ? | 116 - org.apache.camel.camel-core - 2.14.1 | Method :

Any idea?


I'm using servicemix 5.4.0



--
View this message in context: http://camel.465427.n5.nabble.com/Proxy-camel-endpoint-with-blueprint-tp5774323.html
Sent from the Camel - Users mailing list archive at Nabble.com.