camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bryan <brya...@gmail.com>
Subject <proxy>, <export> don't support setting camel context
Date Sat, 03 Jul 2010 07:50:13 GMT

With camel-spring, the <proxy> and <export> tags have an attribute named
"camelContextId" that I presume is meant to set the camel context. This
property in the underlying CamelServiceExporter and CamelProxyFactoryBean is
read-only however, i.e. there is only a getter, no setter. Thus setting the
camelContextId property on the <proxy> or <export> tag will result in an
error on startup.

e.g. This will result in an error:

<camelContext id="myContext">
...
</camelContext>
<proxy camelContextId="myContext"... />

To workaround this, I am defining the export and proxy beans explicitly and
setting the "camelContext" property (rather than the camelContextId
property).

e.g. This works:

<bean id="myProxy"
class="org.apache.camel.spring.remoting.CamelProxyFactoryBean">
  <property name="camelContext" ref="myContext" />
  ...
</bean>

It seems the <proxy> and <export> tags should be changed to have a
camelContext property instead of a camelContextId property.

My environment: Camel 2.4 snapshot, JDK 1.6, Mac OS X 10.6.4 (I think this
is also an issue w/ Camel 2.3)

-- 
View this message in context: http://camel.465427.n5.nabble.com/proxy-export-don-t-support-setting-camel-context-tp547161p547161.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message