The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Can a stateless session bean client call the remove() Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "Can a stateless session bean client call the remove()" Watch "Can a stateless session bean client call the remove()" New topic
Author

Can a stateless session bean client call the remove()

Saurabh Chaubey
Ranch Hand

Joined: Oct 16, 2005
Posts: 101
Can a stateless session bean client call the remove() method. If yes then what would be the result of that call?
Awishek sinha
Ranch Hand

Joined: Jun 24, 2007
Posts: 62
Stateless bean client can call the remove method however the container does not remove the bean instance on this call it just move the bean instance to the pool.


Awishek Kr Sinha<br />SCJP 1.4<br />SCBCD 1.3
Saurabh Chaubey
Ranch Hand

Joined: Oct 16, 2005
Posts: 101
But what happens to the EJBObject which this bean gets on the create() method call. I mean what will happen if the remove() method is invoked before the business method call on a stateless session bean. As the EJBObject for a stateless session bean is linked up with a bean from the pool by the container on the business method call on the bean.
Awishek sinha
Ranch Hand

Joined: Jun 24, 2007
Posts: 62
The EJBObject is removed and calling business method on component interface stub would raise an exception.
Saurabh Chaubey
Ranch Hand

Joined: Oct 16, 2005
Posts: 101
Thanks Awishek for a quick reply!!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Can a stateless session bean client call the remove()
 
Similar Threads
HF questions and others - round 1
session bean's ejbRemove() and RemoveException
calling remove a staless bean
ejbRemove and ejbPassivate
Stateless bean removal