• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why findByPrimaryKey(...) is calling ejbActivate?

 
Arun Kandregula
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
For a CMP bean, when I tried to execute findByPrimaryKey(String), I see that
ejbActivate
ejbLoad
ejbStore

all three are being called.

Piece of code:

IBooksHome bh = (IBooksHome)PortableRemoteObject.narrow(home,arun.entity.booksCMR.IBooksHome.class);
IBooks book = bh.findByPrimaryKey("10001");

When I called home bussiness method...neither of those 3 are called , which is expected.
I know that finder methods, home bussiness methods are called on instances in the pool. Then ***WHY*** the instance is getting activated and being assigned to the EJBObject when I called findByPrimaryKey. WHY THOSE 3 METHODS ARE CALLED.

Please help me out .
Thanks in advance.
Arun.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic