SCJP, SCEA
Originally posted by David Follow:
Hi all,
is there a good rule of thumb where to keep client state?
The options are a) in a servlet, or b) in a stateful session bean.
Stateless session beans are not an option since you only would
use them to implement services, plus they are stateless
I understand that you use SFSB if you need the state "close to the business logic", but what does that really mean?
When would you keep the state in a servlet assuming your business logic
resides in EJBs....
D.
Originally posted by Deepak Pant:
David,
Look at the requirements... the design has to support atleast two clients to start with (WEB+SWING). In future there might be more types of client coming after the application. Use this to decide where should the state be maintained.
Deepak
SCJP, SCEA
Originally posted by Lucy Hummel:
Hi David,
[1] stated that you should use SFSB to manage client state. I do not have the book right here, that is why I can not list any reasons for the recommondation.
Lucy
References:
[1] Deepak Alur, John Crupi, Dan Malks: Core J2EE Patterns, Prentice Hall
SCJP, SCEA
Originally posted by Joe Nguyen:
By keeping in the httpSession, you're tempting to use stateless session bean in place of stateful session bean; this practice increases overhead and have been considered to be bad practice (google).
It depends on where state's belong to. If it's belong to HttpSession, then it 's better be in the HttpSession. Otherwise, it's be in the stateful sb
SCJP, SCEA
Thanks & Regards,<br />Chandramouli Ram
SCJP, SCEA
Thanks,<br />Bhanu<br />SCEA Step-I<br />SCBCD for J2EE 1.3<br />SCJP1.4
I RELEASE YOU! (for now .... ) Feel free to peruse this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|