On Tuesday 15 April 2008 15:58, Rickard Öberg wrote:
> Edward Yakop wrote:
> > On Tue, Apr 15, 2008 at 3:31 PM, Rickard Öberg <[EMAIL PROTECTED]>
> > wrote: On unrelated question.
> >
> > How do u access infrastructure (composite/object builder), query,
> > services, etcs in the script?
>
> Good question, and the same goes for JavaScript. The easiest way is to
> do a mixin in Java that gets ahold of the resources using DI and then we
> could inject a "this" reference to that mixin (probably as a private
> mixin) into Ruby to access them. Either that or we have to implement
> injection into every kind of script language, which sounds tricky.
>
> Any suggestions on this one is welcome.

If we know exactly what we want to inject, we just place those objects into 
the "scope", and they will be available "invisibly" from within the script.

So, we only need to agree on what to inject, such as;

"unitOfWorkFactory" 
"compositeBuilderFactory"
"entityBuilderFactory"

Anything else?


Cheers
-- 
Niclas Hedhman, Software Developer

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to