struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Wannemacher <>
Subject Re: Exceptions thrown by constructor different from those thown by execute() ?
Date Tue, 23 Jun 2009 13:03:22 GMT
On Tue, Jun 23, 2009 at 8:50 AM, Jim Kiley<> wrote:
> From a philosophical perspective, though -- no clue, I don't have a lot of
> insight into why the devs make all the decisions they make.

The decisions I make are usually heavily weighted by how impressed
girls will be :)

I would go against adding security via exceptions thrown by a
constructor. In the default ObjectFactory for xwork, the flow for
creating instances of classes is pretty easy to follow. The exception
handling is deferred to callers (as evidenced by the various "throws
Exception" qualifiers on the methods). The main reason I would be
against it is that you aren't the one calling "new" on the classes. I
can appreciate what you are trying to do, so file a JIRA and when we
have time to investigate, we could probably implement it, but to solve
your problem, the best bet is an interceptor.


Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message