webtier@glassfish.java.net

References to stateful session beans from servlets

From: <webtier_at_javadesktop.org>
Date: Wed, 05 Nov 2008 10:36:04 PST

Hello,

I am writing a web application which in turn relies on several stateful session beans (SFSB) to do the actual work.

Currently I am storing a reference to the SFSB in the HTTP session context of the user and then re-use the reference in the second HTTP request.

All because I heard session beans will only be valid as long as the reference is maintained.

Is this true (correct this way) or is there an alternative? (e.g. obtain the old SFSB reference directly with the aid of the HTTP request via the IntialContext)

Thanks for the help.
[Message sent by forum member 'tipunch' (tipunch)]

http://forums.java.net/jive/thread.jspa?messageID=315087