permaculture playing cards*
The moose likes EJB and other Java EE Technologies and the fly likes how to replicate a remote exception in a dev env? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "how to replicate a remote exception in a dev env?" Watch "how to replicate a remote exception in a dev env?" New topic
Author

how to replicate a remote exception in a dev env?

saran sadaiyappan
Ranch Hand

Joined: Dec 23, 2004
Posts: 39
Hi all,
I am aware that a remote exception thrown when some problem happens over the network, that we are trying to connect. But when I shut down the remote server I get a javax.naming.CommunicationException rather than a remote exception.

How can I replicate the remote exception as I want to display user frendly messages for those kind of exceptions.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Write a mock object, that you call that just throws a RemoteException.



Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Or do that same thing with an EJB on the server, and just throw the Exception.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to replicate a remote exception in a dev env?
 
Similar Threads
RemoteException Confusion
Exceptions
RMI Factory object
Problems installing J2EE on Solaris for Intel
Porting from Weblogic 8.1 to JBoss 4.2.2