Hi

On Mon, Jan 5, 2009 at 8:24 AM, huntc <hu...@mac.com> wrote:
>
> Hi there,
>
> Happy New Year fellow camel riders.
>
> I have a route something like this:
>
>
> from(
>
> "mina:tcp://127.0.0.1:8000?codec=zero3CodecFactory&amp;lazySessionCreation=true&amp;sync=true")
>  .to(
>
> "mina:tcp://127.0.0.1:8001?codec=zero3CodecFactory&amp;lazySessionCreation=true&amp;sync=true");
>
>
> I was wondering it was somehow possible to have port 8000 closed if port
> 8001 closed and vice-versa? The above route works beautifully in that
> traffic sent to port 8000 gets forwarded onto 8001 and vice-versa. However
> what will happen is that the socket on port 8000 will close but the one on
> 8001 will stay up. 8001 is expecting the client connecting to 8000 to close.
>
> In case you're wondering why I'm forwarding traffic on like this it is
> because the thing that sits on 8001 is a horrid program that isn't reliable
> from a networking perspective. I'm using MINA to front-end it so that I can
> build in some decent network handling etc.
>
> Any ideas?
Nice use-case. I am just speculating. In Mina you have a session
object and I think there are some callbacks for session closed or
exception thrown etc. I guess if you could get a hook in the event
when the socket on port 8000 is closed. If so you can then instruct
8001 to close as well (somehow).

Maybe the MINA API has some hints there. I can see you are using your
own codec. Maybe you have the callbacks there you can leverage.


>
> Kind regards,
> Christopher
> --
> View this message in context: 
> http://www.nabble.com/Dependent-endpoints-tp21286657s22882p21286657.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 

/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/

Reply via email to