• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJBHome.remove(Object primaryKey)

 
Vaithiya Sundaram
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if a client invoke EJBHome.remove(Object primaryKey) on a session bean
what exception will be thrown?
RemoveException? or
RemoteException?

The spec mentioned RemoveException in one place(page 42)
and RemoteException(page 43) in other place.
 
Steven Wong
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This will trigger the RemoveException since the SB doesn't have access to a Primary Key.
Remote Exception is thrown when you have system level error occur.
 
Albert Maurucier
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the javadoc quotes:
public void remove(java.lang.Object primaryKey)
throws java.rmi.RemoteException,
RemoveException

"This method can be used only for an entity bean. An attempt to call this method on a session bean will result in a RemoteException"
Regards
Albert
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic