You can use applicationContext.getBean(name) to look up the endpoint that you 
want to use.
The applicationContext can be got from SpringCamelContext.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On January 9, 2015 at 8:03:54 PM, rsoleto (ruben.soleto.buenva...@tecsisa.com) 
wrote:
> Hi all,
>  
> I'm using Camel 2.12.3.
>  
> I've the same problem that Aida says with hasEndpoint() method in thread
> [1]. I have been looking for some solution using lookup methods of Camel
> context registry but without luck.
>  
> The main problem is registry has endpoints that I declare in Spring context
> but my routes are in Java DSL.
>  
> I tried method that getEndopint() using "ref:nameEndpoint" and
> "nameEndpoint" but it isn't work because first String produces an error
> because says:
>  
> - org.apache.camel.ResolveEndpointFailedException: Failed to resolve
> endpoint: ref://seda:miOwnEndpoint due to: No bean could be found in the
> registry for: seda:miOwnEndpoint of type: org.apache.camel.Endpoint
>  
> Second String retrieves the endpoint that I want but if it doesn't exist
> Camel creates new one and I miss exchange when producer template sends the
> message.
> Because of that I need one way to check all available endpoints regardless
> of endpoints cache.
>  
> [1]
> http://camel.465427.n5.nabble.com/camelContext-hasEndpoint-returns-null-when-endpoint-apparently-exists-td5757907.html
>   
>  
> Thanks in advance.
>  
> rsoleto.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Check-endpoints-available-without-looking-into-the-endpoints-cache-tp5761516.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  

Reply via email to