Hi,

Sounds like an excellent idea !

Can this be generalized to also support JSP and other scripting
languages compiling to Java Bytecode ?

Regards
Felix

Am Dienstag, den 15.03.2011, 01:51 +0000 schrieb Justin Edelson: 
> I was looking at how much code is involved in referencing an OSGi
> service from a script built using the scripting.java bundle and think
> it's a bit verbose:
> 
> SlingBindings bindings = (SlingBindings)
> request.getAttribute(SlingBindings.class.getName());
> SlingScriptHelper sling = bindings.getSling();
> Interface service = sling.getService(Interface.class);
> 
> I was thinking about adding some kind of annotation-based injection
> support so that you could replace these lines with just:
> 
> 
> @Inject
> private Interface service;
> 
> public void service(request, response) {
>   // some code using service
> 
> }
> 
> @Inject seems like the obvious candidate to support for this. WDYT?
> 
> Justin


Reply via email to