• Post Reply Bookmark Topic Watch Topic
  • New Topic

bean pool  RSS feed

 
James Foster
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While entity beans are in pool, they have not object identity. They get an identity only after they move to ready state. Is this correct.
If correct, how are we able to execute findByPrimaryKey method on the pool of beans with no identity.
 
Sri Basavanahally
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even when an Entity Bean is in pool, it has a PK associated wih it. You can get a reference to an entity bean if you know what its PK is, by using the findByPrimaryKey method.
 
Bish Ach
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sri Can u plz elaborate a little bit on this topic? I mean how PK is associated with the bean even when its in pool?
EJB Specification says "The implementation of the findByPrimaryKey(primaryKey) method must ensure that the entity object exists."
Does that mean that we can call find...(pri...) method as long as we dont call remove for the ejb Object? Or put it in other way.. Does that mean that once u call remove() method on a EJB object we can not call find... (pri) method when the bean is in pool sate? Plz Make the doubt clear....
Thanx
[ November 11, 2003: Message edited by: Bish Ach ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!