• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejbActiuvate in CMP entity beans

 
sid nagol
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
this question is about CMP entity beans ejbActivate method.
the bean can go from pooled state to method ready state in two ways.

1) ejbCreate, ejbPostCreate,
2) ejbActivate.

my question is what if it goes through ejbActivatre?
in that case, ejbCreate, ejbPostCreate will not be called.

so does ejbActivate should set the cmp, cmr fields
(the whole question is about CMP entity beans only)

thanks
sid
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my question is what if it goes through ejbActivatre?
in that case, ejbCreate, ejbPostCreate will not be called


Yes ejbCreate, ejbPostCreate will not be called in the above case.

ejbCreate, ejbPostCreate will be called when you are creating the entity bean whereas ejbActivate() is called to activate the entity bean that is already created.

so does ejbActivate should set the cmp, cmr fields


No. As the bean is already created there is no need to set the values.
 
sid nagol
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi sawan
thanks for the answer and time
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic