Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling remove(Object) on a session bean...  RSS feed

 
Sub swamy
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When we call remove(Object object) method of a session bean remote home interface(or local interface for that matter) - to remove a session object - do we get a RemoveException or a RemoteException(EJBException) ?

One version of errata that i have says RemoteException while HFEJB says RemoveException would be thrown.
 
Frederic Esnault
Ranch Hand
Posts: 284
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !

From the EJB spec :

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.

HFE is right
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!