--- On Thu, 1/14/10, Adrian Crum <adri...@hlmksw.com> wrote:

> From: Adrian Crum <adri...@hlmksw.com>
> Subject: Re: svn commit: r899053 - 
> /ofbiz/branches/executioncontext20091231/framework/context/src/org/ofbiz/context/ContextUtil.java
> To: dev@ofbiz.apache.org
> Date: Thursday, January 14, 2010, 4:23 PM
> Adam Heath wrote:
> > Adrian Crum wrote:
> >> Adam Heath wrote:
> >>> Adam Heath wrote:
> >>>> T result = Controller.runWith(data, new
> Callable<T>() {
> >>>>     public T call()
> throws Exception {
> >>>>         //
> code
> >>>>     
>    return null;
> >>>>     }
> >>>> });
> >>> I've actually attempted this, and while I
> think the implementation of
> >>> this pattern is simple, actually *using* it in
> higher-level code ends
> >>> up making things rather verbose.
> >>>
> >>> /me goes to think more
> >> I like the idea of encapsulating it all, but it
> seems to me at first
> >> glance that it will require a lot of code
> rewriting. I was trying to
> >> "inject" the new design into existing code without
> altering the existing
> >> code. New code could certainly follow a better
> pattern.
> >>
> > 
> > Why wasn't java.security.AccessController(and friends)
> used for this?
> 
> I don't know. I had a good reason at the time, but I forgot
> what it was. 
> Since the API is the same, I'm sure we could try changing
> it.

I just remembered what the reason was. During the mailing list discussion, it 
was mentioned that we should create an API based on a set of interfaces, so the 
OFBiz implementation could be replaced by another one. The goal is to have an 
out of the box implementation based on the entity engine, but other 
implementations could be developed based on third party libraries or something.







Reply via email to