Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

EJBHome.remove(Object primaryKey)

 
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.
 
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.
 
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
 
Ruth Stout was famous for gardening naked. Just like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic