Hi If you use Spring then you can register your codec in Spring registry in the XML file
<bean id="myCodec" class="com.foo.MyCodec"/> And then yes you can refer to that from the Camel mina endpoint using the # lookup. On Sat, Apr 7, 2012 at 6:28 PM, Steve973 <steve...@gmail.com> wrote: > I think I may have found the answer, so please correct me if I am wrong. > Should I register a bean definition created from the codec instance into the > context, and then refer to it by the name it is registered under? Something > like: > > DefaultListableBeanFactory beanFactory = (DefaultListableBeanFactory) > applicationContext.getBeanFactory(); > beanFactory.registerBeanDefinition("myCodec", > BeanDefinitionBuilder.rootBeanDefinition(MyCodec.class.getName()).getBeanDefinition()); > > Then, I would create my URI like: > "mina:tcp://localhost:18001?codec=#myCodec" if I understand correctly. > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Mina-endpoint-getEndpointUri-results-in-error-tp5624093p5624817.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/