Which version are you using?
This is the code from the 1.x branch as I see it:
protected Endpoint<MinaExchange> createEndpoint(String uri, String
remaining, Map parameters) throws Exception {
if (LOG.isDebugEnabled()) {
LOG.debug("Creating MinaEndpoint from uri: " + uri);
}
setProperties(this, parameters);
URI u = new URI(remaining);
String protocol = u.getScheme();
// if mistyped uri then protocol can be null
if (protocol != null) {
if (protocol.equals("tcp")) {
return createSocketEndpoint(uri, u, parameters);
} else if (protocol.equals("udp") ||
protocol.equals("mcast") || protocol.equals("multicast")) {
return createDatagramEndpoint(uri, u, parameters);
} else if (protocol.equals("vm")) {
return createVmEndpoint(uri, u);
}
}
// protocol not resolved so error
throw new IllegalArgumentException("Unrecognised MINA
protocol: " + protocol + " for uri: " + uri);
}
On Tue, Feb 24, 2009 at 10:39 AM, huntc <[email protected]> wrote:
>
> Having delved into MinaComponent.java, I see that a configuration is copied
> on the creation of an endpoint i.e.
>
> MinaConfiguration config = configuration.copy();
>
> on line 81. This configuration is created on instantiating the mina
> component (that should be just once right?).
>
> I'm guessing that for every Mina endpoint expressed as:
>
> from("mina:...")...
>
> there's a corresponding Endpoint instance created from that one component.
>
> Of course with Mina, one instance of an acceptor can host many socket
> connections. Perhaps with other transports this is not the case and that
> copying the configuration makes sense. However with Mina I am not sure that
> copying the configuration buys you much... perhaps we should instantiate the
> configuration each time instead of copying. That way, we're not going to
> carry forward previous configurations that are not applicable.
>
> Maybe I have this wrong and apologies if so. 'hope that my investigations
> help.
>
> Kind regards,
> Christopher
> --
> View this message in context:
> http://www.nabble.com/Is-Mina-custom-codec-overriding-text-line-codec-tp22176938p22178853.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/