ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Crum <adrian.c...@sandglass-software.com>
Subject Re: Discussion: Service Engine Refactoring
Date Sun, 31 Aug 2014 18:35:19 GMT
I have this done. The change is quite subtle, and it will pave the way 
for removing GenericDelegator references from the service engine.

I will wait a few days before committing so others have time to respond.

Adrian Crum
Sandglass Software

On 8/31/2014 9:50 AM, Adrian Crum wrote:
> Currently, the service engine classes are a bit muddled.
> GenericDispatcher (the default LocalDispatcher implementation) and
> DispatchContext have feature envy. Some functionality in DispatchContext
> belongs in ServiceDispatcher.
> I would like to clean this up a bit and provide better separation of
> concerns. The service engine API will not change - the work will be done
> "under the hood."
> My hope is to get the code to a point where DispatchContext becomes less
> integral to its neighbors, and it becomes more of a single-use
> lightweight container. Again, this will not change the API at all.
> However, it will open up the possibility to improve the API. For
> example, instead of this service implementation:
> public static Map<String, Object> myService(DispatchContext dctx,
> Map<String, Object> context) {
>    Locale locale = (Locale) context.get("locale");
> ...
> we could have:
> public static Map<String, Object> myService(DispatchContext dctx) {
>    Locale locale = dctx.getParameter("locale");
> ...
> What do you think?

View raw message