For a JUnit test case you can follow the example here:
https://svn.apache.org/repos/asf/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaCustomCodecTest.java

To use another type of registry (like Spring or OSGi) see section 4.3 for
Camel in Action here: http://manning.com/ibsen/chapter4sample.pdf

On Thu, Jul 21, 2011 at 8:30 AM, jorsion <[email protected]> wrote:

> Hi, I wrote a custm codec, but I do not know how to load the codec into
> JndiRegistry.
>
> there is some snippet of the code
>
> public class MyRouteBuilder extends RouteBuilder {
>
>    public void configure() {
>
>        JndiRegistry jndi = new JndiRegistry();
>        jndi.bind("creditCodec", new CreditCenterCodec());
>
>
> from("jbi:endpoint:
> http://test.com/CreditAgencyProxy/CreditAgencyProxyEndpoint";)
>                    .to("mina:tcp://
> 127.0.0.1:63637?codec=#creditCodec&sync=false");
>    }
> }
>
> is the code OK?
>
> Best wishes.
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/Camel-mina-component-receiving-connections-but-route-not-working-tp419767p4618962.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>



-- 
Cheers,
Jon
---------------
FuseSource
Email: [email protected]
Web: fusesource.com
Twitter: jon_anstey
Blog: http://janstey.blogspot.com
Author of Camel in Action: http://manning.com/ibsen

Reply via email to