ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Ozerov <voze...@gridgain.com>
Subject Re: Resource SPI proposal
Date Thu, 13 Aug 2015 18:37:13 GMT
+1

It is hard to understand why do we have so much different annotations for
injections while requierd resource type could be clearly derived from field
or method types. Looks like a single annotation will be enough. And it
should not be hard to abstract out injection logic into SPI.

On Thu, Aug 13, 2015 at 6:10 PM, Andrey Kornev <andrewkornev@hotmail.com>
wrote:

> Hello,
>
> Long story short, I'd love to be able to intercept the resource injection
> calls.
>
> For example, in our application we do not use Spring, and also, we do not
> expect the developers to use Ignite-specific annotations in the application
> code. Instead, we use the standard javax.inject API's @Inject which makes
> integration with Ignite a bit painful since every application-level
> closure/class needs to be un-/wrapped before and after serialization. On
> the receiving node, the wrapper code looks up a local instance of injector
> (we use Guice) and finally injects the dependencies.
>
> It would be nice to be able to define a custom injection callback (an SPI)
> to which Ignite would delegate at specific points during the resource
> injection flow. The current implementation of GridResourceProcessor makes
> no provision for such thing.
>
> I also think this feature would allow to make the injector support
> pluggable: Spring, Guice, Dagger, whatever... Going forward, it would also
> be possible to gradually phase out all injection related Ignite annotations
> in favor of the standard javax.inject API.
>
> Please share your thoughts!
>
> Andrey
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message