You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2012/06/03 16:40:52 UTC

Re: How to bind an object in the registry camel?

On Sun, May 6, 2012 at 9:17 AM, Claus Ibsen <cl...@gmail.com> wrote:
> On Sat, May 5, 2012 at 4:19 PM, sekaijin <je...@sap.aphp.fr> wrote:
>> Hi
>>
>> My camel version is 2.8.0
>> I'm running fuseEsb 4.4
>>
>> Thank for this response.
>> but this does not answer to my problem.
>>
>
> I have logged a ticket to look into this
> https://issues.apache.org/jira/browse/CAMEL-5250
>
> It should be possible to define the data formats in the XML and
> reference them from a route in Java code.
>

You need to define your data formats inside the <camelContext>.
Then it should work.

  <camelContext xmlns="http://camel.apache.org/schema/spring">

    <dataFormats>
      <bindy id="myBindy" type="Csv"
classType="org.apache.camel.itest.osgi.bindy.Employee"/>
    </dataFormats>

    ...

  </camelContext>

Then you can refer to the data format using the id "myBindy"




>
>> if I define my bundle and my route with blueprint, the doc  is sufficient to
>> find a solution.
>>
>> my problem is I have to go through a routebuilder because my route can not
>> be determined at compile time.
>>
>> it is defined in the module loading. and as URLs, the presence or absence of
>> processors is determined by the values defined in a database. I do not
>> know in advance how many roads will be built.
>>
>> blueprint at startup, launches routebuilder. it reads the database and
>> builds the road.
>>
>> for the datasource for the codec and I do not see how I go from the registry
>>
>> for example
>> . to ("jdbc:" + getDatasourceNameInConfigBase())
>> or
>> . from ("mina: tcp: " + getHostNameInConfigBase(): getTCPPortInConfigBase()
>> + "?codec=#mllpHL7Codec")
>> require that MyDataSource either the registe and mllpHL7Codec also.
>>
>> how to place?
>> when blueprint gives a hand to routebuilder it can no longer make a bind on
>> the registry
>> blueprint does not provide access to the registry camel.
>>
>> Thank you for your help.
>> A+JYT
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/How-to-bind-an-object-in-the-registry-camel-tp5686392p5687980.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen