• Post Reply Bookmark Topic Watch Topic
  • New Topic

Which Exception is thrown?  RSS feed

 
Muthaiah Ramanathan
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After reading the HFEJB and the one by Paul Sanghera, I'm confused. Which exception is thrown when a client tries to invoke a remove(PrimaryKey) method in local or remote home interface of a session bean.

RemoveException or RemoteException/EJBException?
 
MI Mohammed
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All from the spec:

6.3.2 Because session objects do not have primary keys that are accessible to clients, invoking the javax.ejb.EJBHome.remove(Object primaryKey) method on a session results in the javax.ejb.RemoveException.


6.4.2 Because session objects do not have primary keys that are accessible to clients, invoking the javax.ejb.EJBLocalHome.remove(Object primaryKey) method on a session results in the javax.ejb.RemoveException.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!