Are you sure you add the routes?

Can you post the full code?



On Thu, Jul 14, 2011 at 1:12 PM, Sushmita chandra
<[email protected]> wrote:
> I have written a custom codec,added the reference in the spring XML and have
> written the code for registering with JNDI inside the routebuilder class's
> configure method as below:
>
> void configure(){
>
> -------------
> ------------
> JndiRegistry jndi=new JndiRegistry()
> jndi.bind("XMLCodec",new XMLCodec())
> context = new DefaultCamelContext(jndi.getContext())
>
> from('mina:tcp://0.0.0.0:9091?sync=true&codec=#XMLCodec')
> ----------------
> ----------------
> .to(some endpoint)
> }
>
>
> But when I run this I can see in the console "Total 0 routes, of which 0 is
> started.":
>
>
>
> Jul 14, 2011 4:26:02 PM org.apache.camel.impl.DefaultCamelContext start
> INFO: Apache Camel 2.5.0 (CamelContext: camelContext) is starting
> Jul 14, 2011 4:26:02 PM org.apache.camel.impl.DefaultCamelContext
> createManagementStrategy
> INFO: JMX enabled. Using ManagedManagementStrategy.
> Jul 14, 2011 4:26:02 PM org.apache.camel.impl.DefaultCamelContext start
> INFO: Total 0 routes, of which 0 is started.
> Jul 14, 2011 4:26:02 PM org.apache.camel.impl.DefaultCamelContext start
> INFO: Apache Camel 2.5.0 (CamelContext: camelContext) started in 0.266
> seconds
>
>
> I am not sure as to which is the correct place in the code to place the code
> to register with JNDI.
> Can anyone please help me figure out why the routes are not starting?
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/For-writing-a-custom-codec-for-Mina-EndPoint-where-should-I-place-the-code-for-registering-with-JNDI-tp4586277p4586277.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to