EJB3 and BusinessDelegate pattern?

  • Thread starter =?iso-8859-1?B?U/hyZW4=?=
  • Start date
?

=?iso-8859-1?B?U/hyZW4=?=

Im not sure how to implement business delegate pattern in the new ejb3
era - specifically if theres any need to cache references to remote
objects like caching home objects in ejb2.

What happens if i build a business delegate that caches the reference
to the session bean? Will this lock down the session bean for as long
as the reference exists. I think for stateless session beans im not
guarantied that my invocation on the session bean is always serviced by
the same bean instance although the reference is the same, correct? So
is caching the reference safe - and is is it usefull at all or should i
just call the servicelocator to get proxy intstance every time the
client creates a business delegate? I still want my pool of session
beans to service a larger number of clients than there are beans in the
pool - so i dont want to lock down any particular session bean instance
for one particular client.

My client is web/struts. If its possible to hold on to the business
delegate with the cached reference to the session bean between http
requests? Which is the beast way to do this?
 
R

richardsosborn

I would take a look at the J2EE specification. It should describe the
duration and lifecycle of
beans, once the lookup has been performed. Also, there are many good
articles on the
web site "www.theserverside.com".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top