wood burning stoves*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ejbRemove??" Watch "ejbRemove??" New topic
Author

ejbRemove??

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
hai,
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
Greenhorn

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ejbRemove??