• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confusion about EJB Exceptions

 
Kaxhif Khan
Ranch Hand
Posts: 50
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"?
 
Himai Minh
Ranch Hand
Posts: 1359
7
  • 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