wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Bean's management methods... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Bean Watch "Bean New topic
Author

Bean's management methods...

Gurumurthy Ramamurthy
Ranch Hand

Joined: Feb 13, 2003
Posts: 272
hi,

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

Thanks,
Guru
James Carman
Ranch Hand

Joined: Feb 20, 2001
Posts: 580
What type of bean?


James Carman, President<br />Carman Consulting, Inc.
Gurumurthy Ramamurthy
Ranch Hand

Joined: Feb 13, 2003
Posts: 272
Any Bean...
adrian osullivan
Greenhorn

Joined: Sep 29, 2004
Posts: 6
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

Joined: Feb 13, 2003
Posts: 272
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

Joined: Feb 20, 2001
Posts: 580
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Bean's management methods...