I managed to get it to work from the way I described at the bottom (I had a 
slight problem with my logic, I was firing my retry too many times). My only 
problem is that I cannot reuse the previous IoSession object. That would have 
been realy convinient for me since I cache session object so I can reuse them 
when trying to transmit to an already connected host.

Thanks,


Simon 
-----Original Message-----
From: 이희승 (Trustin Lee) [mailto:[EMAIL PROTECTED] 
Sent: May-18-08 11:29 PM
To: MINA Users
Cc: Niklas Therning
Subject: Re: [Q] Resuming an IoSession after a disconnect

Niklas could answer your question probably.  Niklas?

On Fri, 16 May 2008 10:24:13 +0900, Simon Trudeau <[EMAIL PROTECTED]> wrote:

> Yes I am.
>
> I have managed to reconnect by obtaining the ioService from the old 
> session, connecting (ioconnector.connect) and obtain a new session. I 
> populate my new session with my old session's attributes (including 
> the state machine states) and then I can resume my processing without 
> loosing where I was processing from. Still, one thing troubles me, it 
> seems that my old session is not discarded and when an other 
> disconnect event occurs, the old session's statemachine triggers and 
> tries to handle the disconnect event! I wish the old session would get 
> discarted.  It would greatly simplify my life if I could reconnect and 
> resume my old session (I really don't know how to do that). What would 
> you recommend to handle a statefull  reconnection? Thanks.
>
>
> Simon
> -----Original Message-----
> From: 이희승 (Trustin Lee) [mailto:[EMAIL PROTECTED]
> Sent: May-15-08 5:04 PM
> To: [email protected]
> Subject: Re: [Q] Resuming an IoSession after a disconnect
>
> Hi Simon,
>
> Are you using MINA 2 statemachine module?
>
> On Wed, 14 May 2008 00:05:21 +0900, Simon Trudeau 
> <[EMAIL PROTECTED]> wrote:
>
>> I would like to know how to resume an IoSession after a disconnect.
>> My application queries a server on port A using Mina.
>> Answer from query triggers an FTP upload on port B. Depending on the 
>> time it  takes to perform the FTP upload, the connection to A will 
>> teminate (the remote host reboots due to the ftp upload to apply the 
>> changes). And then I want to resume my session. How should I go about 
>> doing that?
>> I really want to resume my session since my transaction context are 
>> stored in the session and because my code is structured around Mina 
>> StateMachine, I don't want to loose the state I am in!
>> Thanks,
>> Simon
>
>
>
> --
> Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/



--
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Reply via email to