-
1. Re: Exception propagation
tom.elrod Apr 27, 2005 12:41 AM (in response to dls_dls_dls)I does this currently. Maybe you can clarify your question with an example?
-
2. Re: Exception propagation
dls_dls_dls Apr 27, 2005 12:04 PM (in response to dls_dls_dls)On the implementation of a ServerInvocationHandler.invoke method :
public Object invoke(InvocationRequest request) throws Throwable {
try {
myObject.doSomething();
} catch (Exception e) {
throw new MyException(e.getMessage());
}
}
On the client:
...
InvokerLocator locator = new InvokerLocator(url);
Client aClient = new Client(locator);
aClient.connect();
...
try {
aClient.invoke("argument to doSomething");
} catch (MyException e) {
e.printStackTrace();
}
...
The exception MyException is thrown on the server and is caught on the client. It is propagated through the network by the remoting framework.
Hope it carified. -
3. Re: Exception propagation
tom.elrod Apr 27, 2005 1:40 PM (in response to dls_dls_dls)Are you saying that your client does not get the MyException thrown to it when calling the invoke() method? It should. If it does not, then this is a bug and need to enter a jira issue (http://jira.jboss.com).
There is a test case (org.jboss.remoting.exception.server.ServerExceptionTestCase), that test this explicitly as well. -
4. Re: Exception propagation
dls_dls_dls Apr 27, 2005 2:19 PM (in response to dls_dls_dls)No I am not. I just wrote some code with this framework, and have not yet run it, so I ended up putting the question here before seeing it happen. I hadn't seen any reference to it in the pdf, so I asked first
Next time I'll try before asking. Sorry.
Regards