You should not put the remote reference into the servlet session. You
should put the javax.ejb.Handle representation of the RI into the
servlet session:
public interface Handle
extends java.io.Serializable
The Handle interface is implemented by all EJB object handles. A handle
is an abstraction of a network reference to an EJB object. A handle is
intended to be used as a "robust" persistent reference to an EJB object.
>> I have a question for the group and would greatly appreciate your
>> responses.
>>
>> I am making a connection to a stateful session bean from a servlet.
The
>> connection to the session bean is made in the doGet method of the
>> servlet. I make multiple connections to the servlet from the browser.
My
>> intention is to access the same stateful session bean for this
multiple
>> invocations of the servlet. Instead I am getting a new copy of the
>> session bean for each individual invocation of the servlet. Is there
a
>> way to access the session bean across this multiple invocations of
the
>> servlet other than putting the session bean in the init method of the
>>servlet. Do stateful session beans have a concept of a unique key by
>> which they can be identified and retrieved? I am using Weblogic 4.5
EJB
>> server.
>Session beans are specific to the client who created them, in this case
the
>browser session. Put the reference to the bean into the HttpSession
and then
>retrieve it on subsequent calls. In other words, in doGet, try to
retrieve the
>session bean reference from the HttpSession. If it is there, use it.
If it is
>not there, create one, put it in the HttpSession, then use it. It will
be
>there for subsequent calls from the same browser.
--
tcp
Thomas Preston
Vacation.com, Inc.
Engineering Department
617.210.4855 x 124
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".