• 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

Why Session bean methods throw RemoteException

 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

The Enterprise Bean lives inside a container and is not 'directly' involved in Remote capabilities. It is not a java.rmi.Remote object too. It is a passive object, that is exclusively for and under the operation of the EJBObject/Container.

If the purpose of them throwing RemoteException is, they are 'indirectly' involved for Remote Operations, then every object that are inside the Container space should be throwing Remote Exceptions.

In that case, why do Entity Bean and Session Bean methods throw Remote Exceptions.

Please help me understand the concept.

Thanks in advance,
Rajesh
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
RemoteException must be declared in the methods of the remote interface and remote home interface.

RemoteException must not be declared in the methods of the bean class.

It is the container-generated classes that implement the interfaces which have the methods that declare RemoteException.
 
reply
    Bookmark Topic Watch Topic
  • New Topic