I have a stateless session bean and within it I am doing this to rethrow exceptions to the client.
try
{
}
catch(Exception e)
{
throw new TelexHandlerException("", "");
}
My TelexHandlerException class extends Exception. I have made sure that the method is defined as throwing this exception in the remote interface. However, I still cannot get the exception caught by the client at all.
I have tried variations - throwing an EJBException, throwing a general exception, making TelexHandlerException a subclass of RemoteException, making TelexHandlerException a subclass of EJBException and still nothing gets caught on the client. What am I doing wrong?
Incidentally I am using weblogic 5.1. There has been mention of a bug on some of the forums but I don't know if this is correct.
Any ideas would be greatly appreciated!
Discussions
EJB programming & troubleshooting: Cannot rethrow exceptions to client from stateless session bean
-
Cannot rethrow exceptions to client from stateless session bean (2 messages)
- Posted by: Soraya Abbasi
- Posted on: March 01 2002 12:44 EST
Threaded Messages (2)
- Cannot rethrow exceptions to client from stateless session bean by You must leave your job on March 06 2002 00:22 EST
- Cannot rethrow exceptions to client from stateless session bean by Neeraj Nargund on March 06 2002 17:05 EST
-
Cannot rethrow exceptions to client from stateless session bean[ Go to top ]
- Posted by: You must leave your job
- Posted on: March 06 2002 00:22 EST
- in response to Soraya Abbasi
First of all, for me to answer you, you need to explain what exception is!
-
Cannot rethrow exceptions to client from stateless session bean[ Go to top ]
- Posted by: Neeraj Nargund
- Posted on: March 06 2002 17:05 EST
- in response to Soraya Abbasi
In SSLB
SessionBean{
methodB(){
try
{
// DO something
}
catch(Exception e)
{
throw new TelexHandlerException("", "");
// assuming TelexHandlerException is a Runtime Exception
}
}
}
In client
{
try{
SessionBean b.methodB()
}catch(RemoteException e){
// Do Something
}
}