camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hendy Irawan <he...@soluvas.com>
Subject camel:proxy doesn't work outside camelContext
Date Wed, 30 Dec 2009 19:22:00 GMT

The following works:

	<camelContext xmlns="http://camel.apache.org/schema/spring">
		<packageScan>
			<package>com.soluvas.samples.eventfx.camel</package>
		</packageScan>
              <camel:proxy id="sensorEventListener"
serviceUrl="seda:Sensor.SensorEvent"
                 
serviceInterface="com.soluvas.samples.eventfx.camel.Listener" />
	</camelContext>

but this doesn't work:

	<bean class="com.soluvas.samples.eventfx.camel.Sensor">
		<property name="sensorListener">
              <camel:proxy serviceUrl="seda:Sensor.SensorEvent"
                 
serviceInterface="com.soluvas.samples.eventfx.camel.Listener" />
		</property>
	</bean>

and I have to do this:

	<bean class="com.soluvas.samples.eventfx.camel.Sensor">
		<property name="sensorListener">
			<bean class="org.apache.camel.spring.remoting.CamelProxyFactoryBean">
			  <property name="serviceUrl" value="seda:Sensor.SensorEvent"/>
			  <property name="serviceInterface"
value="com.soluvas.samples.eventfx.camel.Listener"/>
			</bean>
		</property>
	</bean>

It's too bad, because `camel:proxy` is very useful and makes Spring Remoting
- Camel concise and readable.

Is it intentional or is there plans to make camel:proxy works everywhere
(even nested inside 'property')? 
-- 
View this message in context: http://old.nabble.com/camel%3Aproxy-doesn%27t-work-outside-camelContext-tp26971191p26971191.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message