Hi Claus, thanks for the response.  I was not trying to lookup spring
stuff through jndi, I was trying to have access both worlds - spring beans
and my container beans (jndi).  I might be mixing both worlds but I really
just want the spring DSL plus the camel routing.  To further explain, what
our plan is to put placeholders on uri routes including where the jndis
should go.  This way, we don¹t touch our xml file, we simply create our
transformation and put it in our properties files and off it goes.

I did look at creating what you mentioned, it looks like it easy enough to
say: hey, your look up starts with ³java:² then it would be JNDI.  But I
couldn¹t figure out where the spring applicationcontext would be injected,
is that available through the spring dsl?  I was looking for something
like:


        
                
                
        
        
                
                        
                                
                                        <bean id="registry" 
class="org.apache.camel.impl.JndiRegistry²>

        <constructor-arg Š./>
</bean>

Your book rocks btw, really helpful.  Thank you again.


On 4/23/14, 3:32 AM, "Claus Ibsen" <[email protected]> wrote:

>Hi
>
>Camel's registry is a facade for an actual registry such as
>- jndi
>- spring's app context
>- osgi service registry
>
>So the spring stuff is only registered in spring's own app context (eg
>that is how spring works). So you cannot use jndi to lookup stuff that
>are in spring's app context.
>
>But you can create a composite registry in Camel that lookup in jndi
>and then spring afterwards.
>But to do that you would need to write some java code to setup that,
>etc. Not as easy and clean to do.
>
>
>On Tue, Apr 22, 2014 at 3:36 PM, Jacinto, Alex (GE Energy Management)
><[email protected]> wrote:
>> Is there a way I can make the two work?  What happens is that when I do
>>ApplicationContextRegistry but wants to access through jndi it won¹t
>>work, if I do the JndiRegistry, it would not resolve all my
>>routeContextRef.  My camel-context looks like:
>>
>>         <routeContext id=³template"
>>xmlns="http://camel.apache.org/schema/spring";>
>>                 <route>
>>                         <from uri=³vm:from" />
>>                                 <bean ref=³java:app/TestJndi"/>
>>                         <to uri=³vm:to" />
>>                 </route>
>>         </routeContext>
>>
>>
>>         <camelContext id=³id"
>>xmlns="http://camel.apache.org/schema/spring";>
>>                 <routeContextRef ref=³template" />
>>         </camelContext>
>>
>> I would like to use camel simply for routing then use my beans for
>>transformation.  Am I going at this the wrong way?  Let me know.  Thanks
>>in advance.
>>
>> Alex
>
>
>
>-- 
>Claus Ibsen
>-----------------
>Red Hat, Inc.
>Email: [email protected]
>Twitter: davsclaus
>Blog: http://davsclaus.com
>Author of Camel in Action: http://www.manning.com/ibsen
>hawtio: http://hawt.io/
>fabric8: http://fabric8.io/

Reply via email to