This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes EJBHome.remove Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJBHome.remove" Watch "EJBHome.remove" New topic
Author

EJBHome.remove

Kalyan Anand
Ranch Hand

Joined: Feb 07, 2007
Posts: 194
What must be the expected behavior when EJBHome.remove is called with null as the parameter i.e. EJBHome.remove(null) on a Stateless Session Bean Home ?
Kalyan Anand
Ranch Hand

Joined: Feb 07, 2007
Posts: 194
Here are the behaviors I see in OC4J 10.1.3. Wondering with the behaviors. What do you think must be the behaviors in the following scenarios ???


SFSB

1. EJBObject.remove() followed by invoking business method on Bean = java.rmi.NoSuchObjectException
2. EJBHome.remove(Object pk) = javax.ejb.RemoveException
3. EJBHome.remove(null) = NullPointerException (at com.evermind.server.ejb.RemoteStatefulSessionEJBHome.remove(RemoteStatefulSessionEJBHome.java:25)
)

SLSB

1. EJBObject.remove() followed by invoking business method on Bean = No exception is thrown from remove and the business method executes successfully !

2. EJBHome.remove(Object pk)= javax.ejb.RemoveException
3. EJBHome.remove(null) = No execption is thrown
 
wood burning stoves
 
subject: EJBHome.remove