Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Confusion on ejbHome,ejbFind and ejbSelect methods!

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi folks,
i have a very hard time understanding the way these ejbHome, ejbFind and ejbSelect methods in *pooled* state. It's stated that an instance of an entity bean is not associated with any particular client in this (*pooled*) state. however, these methods can be run in that state. my question is that who ( a client) these methods are working for? if an instance of any entity bean is not associated with any client, who these methods are associated with and working for? could you please eplain me this?
thanks.
[ December 29, 2003: Message edited by: Tulsi Rai ]
 
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tulsi,

It's stated that an instance of an entity bean is not associated with any particular client in this (*pooled*) state.


Where did you read that ?
Entity beans in the pool have no id : no EJBObject and no primary key. But when they run a method in the pooled state (ejbHome*()) (OK + ejbFind*() and ejbSelect*() called from home business methods, but it's not your business ), they *know* for which client they are working (ctx.getCallerPrincipal() and ctx.isCallerInRole() can be called).
I just remembered in that lifecycle what's important to know from the bean provider's point of view :

(*) Other methods are ejbPostCreate*(), ejbLoad(), ejbStore() and business methods.
Best,
Phil.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic