File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Session Mgmt for failover Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Session Mgmt for failover" Watch "Session Mgmt for failover" New topic

Session Mgmt for failover

suekar meredilko
Ranch Hand

Joined: Mar 27, 2006
Posts: 153

In my design I've not used Stateful EJB, rather I've taken the conventional route of using Stateless EJB(s). I dont want to discuss the good or bad reasons why. My rationale was that stateless ejb will give me a good scalability quality attribute in my design esp. if there is a requirement to scale to upto 600 concurrent users.

What I want to know is regarding my assumption. Now since I'm not using a SFSB, My architecture does not seem to be fault tolerant. e.g if there is a network outage for a brief period of 5 secs, after I made my iternary and going to pay $ using credit card.

I know this can be achieved by storing the session information in a backend database against the userprofile and reusing it the next time. I dont have the time to show this again in my design with more diagrams as already my assignment has become huge.

Can I put this as an assumption ?? Any ideas?
Maris Orbidans
Ranch Hand

Joined: Mar 08, 2004
Posts: 149
Now since I'm not using a SFSB, My architecture does not seem to be fault tolerant.

Stateful or stateless doesn't change anything regarding fault tolerance.
Santiago Urrizola
Ranch Hand

Joined: Apr 27, 2006
Posts: 172
if you dont use a SFSB you must think wich session managment techinque to use in both clients .... (reusability)

Santiago Urrizola : La Plata - Argentina<br />SCEA (89%-92%)<br /><a href="" target="_blank" rel="nofollow"></a>
suekar meredilko
Ranch Hand

Joined: Mar 27, 2006
Posts: 153
"Stateful or stateless doesn't change anything regarding fault tolerance"

sorry i disagree with you. It does. SFSB stores state across method calls. Which means that when the client is unavailable and before the bean times-out, the bean is available. If you are able to locate the same bean back before the time-out happens, the container maintains the state of the bean. Which also means may be your reservation that was pending because you accidentally closed your browser is still available just like a shopping cart... that's what I meant by fault-tolerant in case of a client network outage for a brief duration.

Man these one liner answers really kill the whole idea of a forum !!
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1183
Hi suekar,

Whether we use stateful or stateless beans, the state is kept somewhere - either in a stateful bean or in the client or in the web tier or maybe in the DB.

So really, I'm not sure how this decision affects the fault tolerance need.

What do you think?


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
suekar meredilko
Ranch Hand

Joined: Mar 27, 2006
Posts: 153
Fault tolerant is probably not the right quality attribute to call this.

my 'original' worry is that incase of short network outages or any such scenario the session(client state) should be recoverable. Should I show this in my assumptions or not ?

SFSB would mean that that is implicit and I can just make an assumption that if there is a container crash, the user has to start all over again.

SLSB means that I have to save session state explicitly that besides container crash even loss of connection, I should save the state of the request somewhere if the client returns after sometime.

Hope I am adequately clear this time. I want to know if these things we can put in as an assuption ?
I agree. Here's the link:
subject: Session Mgmt for failover
It's not a secret anymore!