Removing ThreadLocal variables from GenericDelegator

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Removing ThreadLocal variables from GenericDelegator

Adrian Crum-3
Based on a previous discussion, I started work on removing the
ThreadLocal variables from the GenericDelegator class.

It appears they were added to support the entity audit feature. The
problem is, their existence forces framework code to reference the
GenericDelegator concrete class instead of the Delegator interface.

The bottom line is, we have a Delegator interface and a Delegator
factory to facilitate "plugging-in" custom Delegator implementations,
but all of that is useless because of the framework's GenericDelegator
references.

It will take some work to unravel the concrete class dependency.

One problem area is in the Service Engine. It would be helpful to change
the DispatchContext concrete class to an interface - but I don't want to
do that without feedback from the community. Please let me know if there
are any strong objections.

At the same time, that interface could be extended to supply certain
artifacts that are retrieved from other areas - like the current locale,
time zone, and user identifier. This follows along with a suggestion
David Jones made a while back about replacing the DispatchContext with
an Execution Context. So, we have an opportunity to evolve the framework
in the way he envisioned.


--
Adrian Crum
Sandglass Software
www.sandglass-software.com