Re: MinaConfiguration codec property

2009-03-05 Thread Nicolas Bouillon
Thanks ! This way it works. On Thu, Mar 5, 2009 at 10:31, Willem Jiang wrote: > H

Re: MinaConfiguration codec property

2009-03-05 Thread Claus Ibsen
On Thu, Mar 5, 2009 at 10:31 AM, Willem Jiang wrote: > Hi > > Since the myMinaEndpoint is created by the myMinaFactory which has not > the reference from the application context which can be referred by the > camelContext . > So the myMinaEndpoint can't get find the instance of "myCodec". > > My s

Re: MinaConfiguration codec property

2009-03-05 Thread Willem Jiang
Hi Since the myMinaEndpoint is created by the myMinaFactory which has not the reference from the application context which can be referred by the camelContext . So the myMinaEndpoint can't get find the instance of "myCodec". My suggestion is adding a constructor-arg of the camel context under the

Re: MinaConfiguration codec property

2009-03-05 Thread Claus Ibsen
On Thu, Mar 5, 2009 at 10:23 AM, Nicolas Bouillon wrote: > Should I create my Endpoints such they are attached to my CamelContext ? Yeah the component usually does this automatic. But since Mina is much harder to configure than regular components we use the createEndpoint method on the component,

Re: MinaConfiguration codec property

2009-03-05 Thread Nicolas Bouillon
Should I create my Endpoints such they are attached to my CamelContext ? On Thu, Mar 5, 2009 at 10:21, Claus Ibsen wrote: > Hi > > Sorry yeah its a string as this was how its done in Camel 1.x > > We could change it to a real ProtocolCodecFactory object instead of > String and then it should work

Re: MinaConfiguration codec property

2009-03-05 Thread Claus Ibsen
Hi Sorry yeah its a string as this was how its done in Camel 1.x We could change it to a real ProtocolCodecFactory object instead of String and then it should work For uri you should use the # notation to lookup the codec. Btw the NPE you get is because you create it like that using Spring styl

Re: MinaConfiguration codec property

2009-03-05 Thread Nicolas Bouillon
I've already tried that. But the codec property IS a string property, and then i got the following error : Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.example.MyProtocolCodecFactory] to required type [java.lang.String] for property 'cod

Re: MinaConfiguration codec property

2009-03-05 Thread Claus Ibsen
Hi You should use ref to refer to another spring bean value is for string litterals, numbers and such. On Thu, Mar 5, 2009 at 9:55 AM, Nicolas Bouillon wrote: > Hi, > > i've got an error when trying to create my mina endpoint with spring dsl : > >         >         > >         class="org.apa