camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: JNDI Registry
Date Fri, 30 Oct 2009 16:07:23 GMT
On Fri, Oct 30, 2009 at 1:38 PM, DANIEL DE OLIVEIRA FERREIRA
<danieloliveira@pmenos.com.br> wrote:
> Hi,
>
> Reading the camel manual, I saw follow snippet:
>
>    JndiRegistry reg = super.createRegistry();
>    reg.bind("testdb", ds);
>    return reg;
>
> but, where I find createRegistry method? There is a way to registre
> datasource programmatically, no spring xml?
>

That above is for unit testing, where you use the camel-test.jar.

You can just pass in a JNDI context to the DefaultCameContext contstructor.
And there is also a dummy jndi implementation in org.apache.camel.util
you can use.

And in camel 2.1 there is a SimpleRegistry instead that is even easier to use.



> Daniel de Oliveira Ferreira
> Programador
> Farmácias Pague Menos
>
> danieloliveira@pmenos.com.br
> (85) 3255.5453
> www.paguemenos.com.br
>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message