With a request-object we have to pass only one object instead of a lot of arguments. This makes it a lot easier to maintain, because the method signature will never change.
It's no problem to add new fields to the request.
The same counts for response-objects, when used.

Most request-object follow the builder-pattern, every setter returns the request itself.
i.e.: request.setA(a).setB(b).setC(c).setD(d)


Op Tue, 19 Feb 2013 21:13:01 +0100 schreef Karl Heinz Marbaise <khmarba...@gmx.de>:

Hi Stuart,

 > Setting aside the issue of whether DefaultInvocationRequest should
 > really be a component, note that @Component by default defines
 >  a singleton component. You need to add:

    instantiationStrategy = "per-lookup"

to get a new instance on every lookup, otherwise you'd always get the same
 > instance which would be bad if two threads wanted to populate
 > InvocationRequest at the same time.

That's a good hint....cause that would have caught me later with my idea to make multiple threads running ...;-)

AFAIK InvocationRequest is just an abstraction to pass parameters, settings,
 > environment etc. into the Invoker rather than
 > something with identity/lifecycle.

Yes...but it would have made my life easier in my particular use case...but this is no reason to change such a thing...which will work only for a single use case.

Thanks a lot.

Kind regards
Karl-Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to