camel - get jndi registry
问题 I'm using apache camel, and I will be needing the jndi registry so that I can bind an object to it. How do I retrieve a JNDI registry from a RouteBuilder class? Can I also bind using xml? Thanks! 回答1: I was able to do it not within the RouteBuilder but before adding context to the camelMain . JndiRegistry registry = new JndiRegistry(); ... registry.bind("myAntFilter", filter); DefaultCamelContext context = new DefaultCamelContext(registry); camelMain.getCamelContexts().add(context); It is