I think we need not make it thread safe coz the session facade what u
mentioned is not a shared resource. Session beans are private, they r the
extension of the user(each user has a seperate session bean) in the ejb
container (unlike any other resource like a FileInputStream, Socket
connection etc).

-regards
Chetan P Hiremath


> -----Original Message-----
> From: Sunder Rajan [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, January 10, 2002 7:05 AM
> To:   [EMAIL PROTECTED]
> Subject:      EJB reference in Java Pet Store(thread safe???)
>
> Iam trying to obtain a reference to my session facade  bean from my
> servlet, After looking at the archives, I have realised the safest way
> to obtain one is from the init method of the servlet. But, in the java
> pet store code
> (petstore1.3/src/waf/src/controller/com/sun/j2ee/blueprints/waf/controll
> er/web/WebClientControllerImpl.java), they obtain a reference to the
> home interface in a non synchronized method. Is this thread safe ?
>
> Sunder
>
> ==========================================================================
> =
> 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".

===========================================================================
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".

Reply via email to