I don't think clients should be exposed to the implementation details of why the
server failed.
The server admin people need to know this, but not the client. The client needs to to know
something went wrong (e.g. "failed to acknowledge"), but it's leaking
implementation details when we tell them it's because of a nested
com.acme.widget.WidgetException from line 760 of
com.acme.widget.SnoopOnCustomersClass.class
Not only does this require them to have the jars on the client it means clients can start
doing things like this:
| try
| {
| producer.send(message);
| }
| catch (JMSException e)
| {
| Exception cause = e.getLinkedException();
|
| if (cause instanceof WidgetException)
| {
| // do something
| }
| }
|
Now the client code is tightly coupled to server implementation details.
I don't think we should give clients rope, since some are sure to hang themselves with
it.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959792#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...