Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Removing a stateless session bean local reference

grohlFeb 24 2009 — edited Feb 25 2009
Hello:

I've got a doubt about the concept of removing a stateless session bean local reference.

If a stateless session bean A has got a local reference of another stateless session bean B, and invokes remove() method ,
What does happen with the local reference ? Is it set to null ? Or is a propietary behaviour ? And if the session bean is removed automatically by container after timeout ?

I ask this because I'd like to store local references to B in local variables in A and check
if ( localReference == null )
localReference = localHomeReference.create();

return localReference;
I know that I mustn't presuppose any value in stateless session bean , but this way can save me to get new references to the same session beans
Is this right or violate EJB spec?

Thanks

Regards
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 25 2009
Added on Feb 24 2009
5 comments
251 views