You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jorsion <jo...@gmail.com> on 2011/07/21 13:00:31 UTC

Re: Camel mina component receiving connections but route not working

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.

Re: Camel mina component receiving connections but route not working

Posted by jorsion <jo...@gmail.com>.
Thanks

On Wed, Aug 3, 2011 at 9:00 PM, Jon Anstey [via ServiceMix] <
ml-node+4662207-1165614311-219808@n5.nabble.com> wrote:

> 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 <[hidden email]<http://user/SendEmail.jtp?type=node&node=4662207&i=0>>
> 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<http://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: [hidden email]<http://user/SendEmail.jtp?type=node&node=4662207&i=1>
> Web: fusesource.com
> Twitter: jon_anstey
> Blog: http://janstey.blogspot.com
> Author of Camel in Action: http://manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://servicemix.396122.n5.nabble.com/Camel-mina-component-receiving-connections-but-route-not-working-tp419767p4662207.html
> To unsubscribe from Camel mina component receiving connections but route
> not working, click here<http://servicemix.396122.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=419767&code=am9yc2lvbkBnbWFpbC5jb218NDE5NzY3fC0xNDM0Njg0NzU5>.
>
>



-- 
JoSn


--
View this message in context: http://servicemix.396122.n5.nabble.com/Camel-mina-component-receiving-connections-but-route-not-working-tp419767p4665372.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Camel mina component receiving connections but route not working

Posted by Jon Anstey <ja...@gmail.com>.
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 <jo...@gmail.com> 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: jon@fusesource.com
Web: fusesource.com
Twitter: jon_anstey
Blog: http://janstey.blogspot.com
Author of Camel in Action: http://manning.com/ibsen