This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Confusion about EJB Exceptions  RSS feed

 
Ranch Hand
Posts: 51
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


In EJB specification document section 14.3.1 (page number 384), table row 2 (system exception portion) said via note 'E' as

[E] If the business interface is a remote business interface that extends java.rmi.Remote, the java.rmi.RemoteException is thrown to the client, which will receive this exception.

Practically i found "com.sun.ejb.containers.InternalEJBContainerException" thrown to the client, here is the code



"searchBook" method of BookService is invoked from another EJB.

Is it a mistake in specs document or i am doing something wrong because of which i am not able to receive "java.rmi.RemoteException"?
 
Ranch Hand
Posts: 1701
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you use a client that calls the searhBook method remotely?
For Java RMI, I think the client needs to know the IP address of the server and make connection to the server.
Refer to the Java RMI tutorial from Oracle.
Does your client inject the BookService bean?
If the client instantiate the BookService object, then it is not used as an EJB.


 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!