You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by fxthomas <fe...@gmail.com> on 2016/02/11 15:01:41 UTC

pass custom constant value to a bean in Spring XML

hello, 

   I am trying to pass a constant value which is defined in a class, but it
does not work .I  am using 2.16.1 version of camel. 
I have defined as below in the XML.

<bean id="LoaderConstant" class="com.LoaderConstants"/>

 <to
uri="bean:monitorbean?method=insertEvent(${bean:LoaderConstant.DS_EVENT_FILE_PROCESS_START},${header.CamelFileName},'')"/>


But the value of the Constant is not passed to the method and is always
NULL.
Is there anyway I can Re use the Constants from a Java class or I need to
Hard code it ?

rx
Felix 



--
View this message in context: http://camel.465427.n5.nabble.com/pass-custom-constant-value-to-a-bean-in-Spring-XML-tp5777598.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: pass custom constant value to a bean in Spring XML

Posted by Claus Ibsen <cl...@gmail.com>.
See the type function of simple at
http://camel.apache.org/simple

On Thu, Feb 11, 2016 at 3:01 PM, fxthomas <fe...@gmail.com> wrote:
> hello,
>
>    I am trying to pass a constant value which is defined in a class, but it
> does not work .I  am using 2.16.1 version of camel.
> I have defined as below in the XML.
>
> <bean id="LoaderConstant" class="com.LoaderConstants"/>
>
>  <to
> uri="bean:monitorbean?method=insertEvent(${bean:LoaderConstant.DS_EVENT_FILE_PROCESS_START},${header.CamelFileName},'')"/>
>
>
> But the value of the Constant is not passed to the method and is always
> NULL.
> Is there anyway I can Re use the Constants from a Java class or I need to
> Hard code it ?
>
> rx
> Felix
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/pass-custom-constant-value-to-a-bean-in-Spring-XML-tp5777598.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2