I am using the Bean element, Where JNDI context is created and it refers to
the SayService class …
After that below one DSL route is created consisting of BeanRef
Camel component.
On running this configuration, below exception is reported
org.apache.camel.NoSuchBeanException: No bean could be found in
the registry for: myBeanId
Referred this site, but could not get any help.
In what way I can register the bean? Please help me in this
regard.
Please see the code below:
// Creating the JNDI context.
JndiContext context;
try
{
context = new JndiContext();
context.bind("myBeanId",new SayService());
}
catch(Exception e)
{
e.printStackTrace();
}
from("jms:queue:nq1").
//to("bean:bye")
beanRef("myBeanId","printhello")
.to("jms:queue:nq2");
--
View this message in context:
http://www.nabble.com/Probem-in-Bean-element-tp25990048p25990048.html
Sent from the Camel - Users mailing list archive at Nabble.com.