The Artima Developer Community
Sponsored Link

Java Answers Forum
Session Object & Server Crash

4 replies on 1 page. Most recent reply: Aug 25, 2002 11:15 PM by Keshav

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 4 replies on 1 page
Keshav

Posts: 11
Nickname: kesh
Registered: Aug, 2002

Session Object & Server Crash Posted: Aug 19, 2002 5:21 AM
Reply to this message Reply
Advertisement
Hi Geniuses,

PART I
What will happen to the session object when the connection from the client is disconnected ?

Does it depend on the type of session object created scope
OR
Does it depend on the type of session handling used, e.g Cookies, Session objects,etc

PART II

Also What happens to the session object when the server crashes. Does any server support "server crash"

Ex
When ur in a transaction & the server crashes, the client will not be aware of this server crash, When the server re-starts the transaction should be continued rather the client re-starting the transaction from scratch. What ever data is transacted before the server crash will be rolled back or not.

In a cluster of servers the transaction may be handled by another server. This is possible only if there is a replication of the transaction available

Not to intentionally trouble your'll, I need to know the answer in stituations when u have a Single Server & in Cluster of Servers.

Sorry if I'm not clear with the Question ..

Plz do help me with the answers .. Sorry if I have loaded your'll too much

Thanx in advance

Keshav


Javed

Posts: 15
Nickname: javedm
Registered: Aug, 2002

Re: Session Object & Server Crash Posted: Aug 20, 2002 12:34 AM
Reply to this message Reply
> Hi Geniuses,
This sounds little insulting. We are all java developers here some may be good at one topic and others at some other topic.

>
> PART I
> What will happen to the session object when the
> connection from the client is disconnected ?
>
> Does it depend on the type of session object created
> scope
> OR
> Does it depend on the type of session handling used,
> e.g Cookies, Session objects,etc

What ever is the case, if the connection is lost from the client, the session gets timedout, time out is set by the programmer.


>
> PART II
>
> Also What happens to the session object when the
> server crashes. Does any server support "server
> crash"

what do u mena by 'Does any server support "server
> crash"'. It did not get this.

>
> Ex
> When ur in a transaction & the server crashes, the
> client will not be aware of this server crash, When
> the server re-starts the transaction should be
> continued rather the client re-starting the
> transaction from scratch. What ever data is
> transacted before the server crash will be rolled
> back or not.

If u use transactions (JTA for ex. ur transaction will be rolled back)
>
> In a cluster of servers the transaction may be
> handled by another server. This is possible only if
> there is a replication of the transaction available
>
> Not to intentionally trouble your'll, I need to know
> the answer in stituations when u have a Single Server
> & in Cluster of Servers.

It is difficult to handle such situations where a server fails and the session is lost, even if it is in a clustered env. It is simple with a stateless session bean as it dose not need state, in other words, Session.

The work around is to store the session to any persistence storage and retrive it back when the server is up or other server in the cluster is trying to service. Some app servers have such option.

I hope I have cleared your doubt.

Keshav

Posts: 11
Nickname: kesh
Registered: Aug, 2002

Re: Session Object & Server Crash Posted: Aug 23, 2002 3:00 AM
Reply to this message Reply
Thanx Javed for have answered by Questions

U really have a lot of patience .. Thanx a ton

If u don't mind the Question which wasn't clear I would like to highlight it ..

"Server Crash" in the sense the server goes down for some or the other reason, power off may be. It happens in Win NT ( blue screen) -:)

If this happens I don't think there's a possibility of rollback. Well I don't have any idea.. just guessing :)

Plz do help me with this ...

Rgds

Keshav

Don Hill

Posts: 70
Nickname: ssswdon
Registered: Jul, 2002

Re: Session Object & Server Crash Posted: Aug 23, 2002 1:19 PM
Reply to this message Reply
> Hi Geniuses,
>
> PART I
> What will happen to the session object when the
> connection from the client is disconnected ?

------------------------------------------
Most app servers have a setting for the session timeout, when the client disconnects from the server the server will see that the session has a certain idle time, once this idle time has been reached it will be cleanup or Garbage collected by the server.

------------------------------------------
>
> Does it depend on the type of session object created
> scope
> OR
> Does it depend on the type of session handling used,
> e.g Cookies, Session objects,etc
----------------------------------------------------
There are appservers that have session failover, if this is what you are referring to.

and if you are storing session info on the client side ie:cookies then this would also be a way to save session info.

>
> PART II
>
> Also What happens to the session object when the
> server crashes. Does any server support "server
> crash"
-------------------------------------------------
Take a look at session failover!

> Ex
> When ur in a transaction & the server crashes, the
> client will not be aware of this server crash, When
> the server re-starts the transaction should be
> continued rather the client re-starting the
> transaction from scratch. What ever data is
> transacted before the server crash will be rolled
> back or not.
>
> In a cluster of servers the transaction may be
> handled by another server. This is possible only if
> there is a replication of the transaction available
>
> Not to intentionally trouble your'll, I need to know
> the answer in stituations when u have a Single Server
> & in Cluster of Servers.
>
> Sorry if I'm not clear with the Question ..
>
> Plz do help me with the answers .. Sorry if I have
> loaded your'll too much
>
> Thanx in advance
>
> Keshav

Keshav

Posts: 11
Nickname: kesh
Registered: Aug, 2002

Re: Session Object & Server Crash Posted: Aug 25, 2002 11:15 PM
Reply to this message Reply
Hi Don

Thanx for ur precious time .

Rgds
Keshav

Flat View: This topic has 4 replies on 1 page
Topic: crontab functionality in java Previous Topic   Next Topic Topic: what makes us recognise a bean??

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use