• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Doubt in remote exceptions

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
According to the spec, any local home/component interface "must not throw remote exception" or it's subclasses. But in sun 1.3 ri, if I throw remote exception in my method signatures of local home/component interface, I don't get any error. Can I throw 'em in my bean classes? what's the rule of thumb??
Regards,
Sajid
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Compiler doesnt care if you throw RemoteException in local home or local component interface. But I am sure that will get fail at bean deployment time.
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is legal as far as the java language goes to throw a remote exception from the local/local home interfaces, but it's not legal according to the EJB specification. A good container/tool will verify this and let you know before deployment, and almost all containers will fail AT deployment.

when studying for the exam, if you see "you cannot do X for this situation" they're almost always saying that "even if X is legal in the java language, it's not legal in the EJB spec. Do don't do it".
 
Michael Valentino
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is legal as far as the java language goes to throw a remote exception from the local/local home interfaces, but it's not legal according to the EJB specification. A good container/tool will verify this and let you know before deployment, and almost all containers will fail AT deployment.

when studying for the exam, if you see "you cannot do X for this situation" they're almost always saying that "even if X is legal in the java language, it's not legal in the EJB spec. Do don't do it".
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic