I like the idea of having it configurable - let the web services team configure 
theirs so it returns the exception, let me configure it so it will throw the 
exception :-)

I just learned that a recent change now means invoke doesn't return an 
exception object, instead it returns a String (correct Tom?).

I don't like this.  You have no notion that this is really an error.  At the 
very least, if I can't get the exception thrown, I would prefer the object 
returned by invoke to be an Exception - its getMessage() can return that String 
that is returned now.

Wrapping in an Exception means at least my caller to invoke will know that a 
true exception occurred.  The stuff I'm working on, I want to use remoting's 
great feature of just being able to switch transports (in the invoker locator) 
and have a completely different transport mechanism used.  My code never really 
knows what transport is being used - the customer just configures the locator 
URL in a config file to what they want to and *poof* they get what they want. 
If you force me to look at the HTTP return code, that requires my code to 
assume I am using a servlet or http transport.  But that isn't always true.  
Looking at the return value of invoke() and seeing if it is instanceof 
Exception is acceptable in my usecase (of course, having an exception getting 
thrown would be ideal).


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958290#3958290

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958290
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to