camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: <proxy>, <export> don't support setting camel context
Date Sat, 03 Jul 2010 09:32:11 GMT
I just Filled a JIRA[1] for it, we should add this method to support 
user defines the <proxy> out of <camelContext>
[1]https://issues.apache.org/activemq/browse/CAMEL-2904

Willem
----------------------------------
Apache Camel, Apache CXF committer
Open SOA http://www.fusesource.com
Blog http://willemjiang.blogspot.com
Tiwtter http://twitter.com/willemjiang

bryan wrote:
> 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)
> 


Mime
View raw message