This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Using EJB via RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Using EJB via RMI" Watch "Using EJB via RMI" New topic
Author

Using EJB via RMI

Xavier Fabreguettes
Greenhorn

Joined: Jul 17, 2003
Posts: 14
Hi,

I was wondering about what happens when you have a client application (plain java class) invoking a method against an EJB via RMI.

Say that the Remote interface is something like



where MyException is an application exception written by the bean provider (hence packaged up in the same jar as the bean itself).

For this invocation to work successfully, do specific constraints apply to MyException? (i.e. implementing Remote or Serializable)?

Thanks for your help.
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
I think, you may not throws MyException in this method.

Because you can wrapped MyException into RemoteException.


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

Application exception propagates to the Client as it is. No worries.


Groovy
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

For this invocation to work successfully, do specific constraints apply to MyException? (i.e. implementing Remote or Serializable


Exception class extends java.io.Serializable. There is no need to implement Remote interface.
Xavier Fabreguettes
Greenhorn

Joined: Jul 17, 2003
Posts: 14
Exception class extends java.io.Serializable. There is no need to implement Remote interface.


Makes sense. Forgot to check, it should have put me on the right track! Thanks for your help.

Xavier
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using EJB via RMI
 
Similar Threads
how to connect to remote pc to run a batch file in java
EJB Access from Stand Alone Application in WSAD
Local / Remote / Web Service which one to invoke?
delegate options
Local / Remote / Web Service which one to invoke?