This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes ejbRemove?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ejbRemove??" Watch "ejbRemove??" New topic


william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
What happens when i call remove on a session bean?Is bean instance in server destroyed?OR is the implementation server specific?

Help me!Help you!!!
Karan V Praba
Ranch Hand

Joined: Oct 31, 2002
Posts: 41
The session object will be removed (object no longer available) from the client and it will throw an exception if the client invokes any method after the remove method. (Internally life cycle of bean will be ended).

Karan V Praba.
william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
thanks karan for that response
Brian Stelzer

Joined: Oct 31, 2002
Posts: 29
The actual instance may or may not be deleted from the pool for efficiency sake. To the user, it appears that it has been removed, but inside the server, it probably wouldn't make sense to destroy the instance and have to recreate an object. It probably would use the same instance and reinitialize. For instance, take a stateless session bean, I set some instance variables for example( bad programming ), I end my client program, I start up the client program again or any other client program, and I create an same type of stateless session bean as before, now the first thing I do is read the instance variable, its entirely possible to get the old value back. Now stateful session beans are slightly different, there data is passivated. When you remove the data is basically lost, but the actual instance or object is put back into the pool.
wood burning stoves
subject: ejbRemove??
It's not a secret anymore!