• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bean's management methods...

 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Can anyone tell what are the bean's management methods? Are they ejbCreate(), ejbRemove(), ejbPassivate(), ejbActivate()???

Thanks,
Guru
 
James Carman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What type of bean?
 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any Bean...
 
adrian osullivan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I agree.

Can anyone tell me what an EJB is? Also, what is Java? Now I come to think of it, why are we here?
 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok Guys relax.

My question was:

Take an example of Stateless Session Bean. Here, we have ejbCreate(), ejbActivate(), ejbPassivate() and ejbRemove() methods. Are these called the Bean's management methods?

Answer:

Later I got the answer. Yes these are the Bean's management methods meaning that the container can call these methods to indicate what is going on at any instant. When the bean is garbage collected, then the SOP or logic inside the ejbRemove() would be executed.

Also, there are certain callback methods are also available. This is opposite to these management methods. The callback methods are called by the bean, say the methods of EJBContext are all callback methods that bean can ask the container about itself like EJBHome, the security credentials etc.

Thanks,
Guru
 
James Carman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gurumurthy Ramamurthy:
Any Bean...


Those methods aren't applicable for any bean. Stateless session beans will not have their activate/passivate methods called, as they maintain no state necessary to activate/passivate. Also, I think these methods are more commonly known as the "lifecycle" methods.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic