https://issues.apache.org/jira/browse/OFBIZ-5743
Adrian Crum
Sandglass Software
www.sandglass-software.com
On 9/1/2014 7:26 AM, Jacopo Cappellato wrote:
I would like to review your work; could you please commit the changes to an
experimental branch or at least share a patch in Jira?
Thanks,
Jacopo
On Aug 31, 2014, at 8:35 PM, Adrian Crum <adrian.c...@sandglass-software.com>
wrote:
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
www.sandglass-software.com
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?