Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread Session ID no longer present on the server
Wed, May 14 2008 7:22 AMPermanent Link

Michael Fullerton
Using a remote connection to the EDB server, if I stop the server and
then restart it I get the error: "Session ID X no longer present on
the server". I tried coding OnRemoteReconnect to reconnect the session
to no avail. How can I prevent this error in such a situation?
Wed, May 14 2008 12:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<< Using a remote connection to the EDB server, if I stop the server and
then restart it I get the error: "Session ID X no longer present on the
server". I tried coding OnRemoteReconnect to reconnect the session to no
avail. How can I prevent this error in such a situation? >>

Once you stop the server, all sessions are removed.   Therefore, there is no
longer any session present that can be reconnected to by the remote session.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, May 14 2008 12:52 PMPermanent Link

Michael Fullerton
On Wed, 14 May 2008 12:21:11 -0400, "Tim Young [Elevate Software]"
<timyoung@elevatesoft.com> wrote:

>Michael,
>
><< Using a remote connection to the EDB server, if I stop the server and
>then restart it I get the error: "Session ID X no longer present on the
>server". I tried coding OnRemoteReconnect to reconnect the session to no
>avail. How can I prevent this error in such a situation? >>
>
>Once you stop the server, all sessions are removed.   Therefore, there is no
>longer any session present that can be reconnected to by the remote session.

There must be a way to start a new session though without having to
restart the client software. Usually there would be some kind of error
event that would fire when you try to access the server and its not
there. At that point you can attempt to connect with a new session.
Wed, May 14 2008 1:40 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<< There must be a way to start a new session though without having to
restart the client software. Usually there would be some kind of error event
that would fire when you try to access the server and its not there. At that
point you can attempt to connect with a new session. >>

How do you propose that we re-establish all of the state information
regarding where your application was in terms of cursor positions, index
orders, etc. ?  This is not a situation where you are trying to connect for
the first time - you have an active session on the server and then, all of a
sudden, the server is gone.  The only thing EDB can do at that point is say
"hey, do you want to try and reconnect ?", and if you say yes, then it will
attempt to do so.  On the flip side, if you want to just shut down the
session on the client side and start over again from scratch, you can do so
with no problem.  But a transparent reconnect in such a situation is out of
the question.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, May 14 2008 2:10 PMPermanent Link

Michael Fullerton
On Wed, 14 May 2008 13:40:58 -0400, "Tim Young [Elevate Software]"
<timyoung@elevatesoft.com> wrote:

>Michael,
>
><< There must be a way to start a new session though without having to
>restart the client software. Usually there would be some kind of error event
>that would fire when you try to access the server and its not there. At that
>point you can attempt to connect with a new session. >>
>
>How do you propose that we re-establish all of the state information
>regarding where your application was in terms of cursor positions, index
>orders, etc. ?  This is not a situation where you are trying to connect for
>the first time - you have an active session on the server and then, all of a
>sudden, the server is gone.  The only thing EDB can do at that point is say
>"hey, do you want to try and reconnect ?", and if you say yes, then it will
>attempt to do so.  On the flip side, if you want to just shut down the
>session on the client side and start over again from scratch, you can do so
>with no problem.  But a transparent reconnect in such a situation is out of
>the question.

What I am asking then is how and where do I respond when EDB asks
"hey, do you want to try and reconnect ?". IOW what event corresponds
with this query from EDB?
Thu, May 15 2008 2:23 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<< What I am asking then is how and where do I respond when EDB asks "hey,
do you want to try and reconnect ?". IOW what event corresponds with this
query from EDB? >>

The TEDBSession.OnRemoteReconnect event:

http://www.elevatesoft.com/manual?action=mancompevent&id=edb1&product=d&version=7&comp=TEDBSession&event=OnRemoteReconnect

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, May 15 2008 3:08 PMPermanent Link

Michael Fullerton
On Thu, 15 May 2008 14:23:27 -0400, "Tim Young [Elevate Software]"
<timyoung@elevatesoft.com> wrote:

>Michael,
>
><< What I am asking then is how and where do I respond when EDB asks "hey,
>do you want to try and reconnect ?". IOW what event corresponds with this
>query from EDB? >>
>
>The TEDBSession.OnRemoteReconnect event:

How? Attempting to close down the session, DB or engine here before
attempting to reconnect results in the app freezing.

>http://www.elevatesoft.com/manual?action=mancompevent&id=edb1&product=d&version=7&comp=TEDBSession&event=OnRemoteReconnect
Thu, May 15 2008 4:30 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<< How? Attempting to close down the session, DB or engine here before
attempting to reconnect results in the app freezing. >>

You're going to have to display a message to the user indicating that they
need to take specific action in order to shut down the appropriate windows,
etc. and close down the session *after* you set Continue to False in the
OnRemoteReconnect event handler and the event handler exits.   Shutting down
the session in the OnRemoteReconnect event handler is a no-no, and will
result in you taking the knees out on the current session while it's in the
middle of still trying to deal with the fact that a particular call could
not be completed.  IOW, the shutdown has to happen outside of the context of
an in-progress request/response sequence to the ElevateDB Server.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, May 15 2008 5:41 PMPermanent Link

Michael Fullerton
On Thu, 15 May 2008 16:30:14 -0400, "Tim Young [Elevate Software]"
<timyoung@elevatesoft.com> wrote:

>Michael,
>
><< How? Attempting to close down the session, DB or engine here before
>attempting to reconnect results in the app freezing. >>
>
>You're going to have to display a message to the user indicating that they
>need to take specific action in order to shut down the appropriate windows,
>etc. and close down the session *after* you set Continue to False in the
>OnRemoteReconnect event handler and the event handler exits.   Shutting down
>the session in the OnRemoteReconnect event handler is a no-no, and will
>result in you taking the knees out on the current session while it's in the
>middle of still trying to deal with the fact that a particular call could
>not be completed.  IOW, the shutdown has to happen outside of the context of
>an in-progress request/response sequence to the ElevateDB Server.

So in OnRemoteReconnect you set a flag and then have a TTimer check
say every minute to see if the flag is set. If it is set close the
session and reopen it. That's pretty kludgey. Would be nice if EDB
could handle this itself somehow. Anyway, OnRemoteReconnect is also
fired if say on a wireless network the connection is temporarily
broken. In that case you just want EDB to reconnect on its own as the
session still exists. How do you distinguish distinguish between the
two situations? IOW how do you tell if the session still exists on the
server?
Fri, May 16 2008 12:51 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<< So in OnRemoteReconnect you set a flag and then have a TTimer check say
every minute to see if the flag is set. If it is set close the session and
reopen it. That's pretty kludgey. >>

No, I would recommend what I stated - give the user the option to decide
what to do.  They are in the best position to tell the application how to
respond to the situation, and can check with the network administrator as to
what happened.

<< Would be nice if EDB could handle this itself somehow. >>

Sorry, but there really is no clean way for EDB to handle this without some
serious side-effect issues for your application.

<< Anyway, OnRemoteReconnect is also fired if say on a wireless network the
connection is temporarily broken. In that case you just want EDB to
reconnect on its own as the session still exists. How do you distinguish
distinguish between the two situations? IOW how do you tell if the session
still exists on the server? >>

There's no way for EDB or any other application to know.  Only a human being
can tell what happened to the connection, hence why I recommend that you ask
said human being.

--
Tim Young
Elevate Software
www.elevatesoft.com

Page 1 of 2Next Page »
Jump to Page:  1 2
Image