I have heard someone saying that stateful session beans are not scalable. Is it true? If so why? And if not why?
My opinion is that the applications using stateful session beans may not be scalable because of the limitations of these beans. But however, this depends on the Application server being used. Am I right?
Could someone clarify this please?
Regards,
Anil
-
Scalability of stateful session beans (4 messages)
- Posted by: Anil Kumar
- Posted on: April 26 2001 01:20 EDT
Threaded Messages (4)
- Scalability of stateful session beans by Tony Brookes on April 26 2001 13:08 EDT
- Scalability of stateful session beans by Anil Kumar on April 27 2001 00:29 EDT
- Scalability of stateful session beans by John Harby on May 17 2001 10:31 EDT
- Scalability of stateful session beans by Tony Brookes on May 17 2001 10:41 EDT
-
Scalability of stateful session beans[ Go to top ]
- Posted by: Tony Brookes
- Posted on: April 26 2001 13:08 EDT
- in response to Anil Kumar
Since they store conversational state of the client, stateful session beans are far less scaleable than stateless ones, but that's subtely different from saying that stateful beans are not scaleable.
The steps go...
1) Client proxy object calls method on server side EJBObject.
2) EJBObject is attached to an instance of the appropriate bean type.
3) All client conversational state from the EJBObject is set in the bean.
4) The method is run.
Step (3) is completely avoided using a stateless session bean. Since it tends to get done by reflection, this is a relatively expensive step and a good one to avoid.
The more important issue is that most servers cannot fail over method calls on stateful session beans. If the server dies then the client proxy will get an exception and will have to relookup the bean. With stateless beans this is not usually an issue. (See other posts on session beans and idempotence etc for more info.)
Does that help?
Chz
Tony -
Scalability of stateful session beans[ Go to top ]
- Posted by: Anil Kumar
- Posted on: April 27 2001 00:29 EDT
- in response to Tony Brookes
Thanks Tony, your reply clarifies my doubt.
Regards,
Anil -
Scalability of stateful session beans[ Go to top ]
- Posted by: John Harby
- Posted on: May 17 2001 10:31 EDT
- in response to Tony Brookes
What about when using the in-memory replication featured in Weblogic 6.0? -
Scalability of stateful session beans[ Go to top ]
- Posted by: Tony Brookes
- Posted on: May 17 2001 10:41 EDT
- in response to John Harby
That makes the more fault tolerant, but the step of restoring the state from the client still makes them less scalable than stateless session beans.
However, with the new features in 6.0 I expect stateful beans to be much less painful to use than in the past.
Chz
Tony