You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Komal Chugh <20...@iitrpr.ac.in> on 2019/06/01 20:12:11 UTC

Bean injection in Cache store implementation

I am overriding write method of cache store and using
FactoryBuilder.factoryOf method in the cache configuration. But I need to
inject spring bean in the cache store implementation. I tried using
@SpringResource by defining that bean in xml file, but there are a lot of
nested beans which are defined using java. Is there a way I can inject a
bean defined using java in cache store implementation? 



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Bean injection in Cache store implementation

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

You can use @SpringApplicationContextResource to get the whole
SpringContext.

Alternatively, you can have a custom factory which will initialize your
bean properly. The factory is there for a reason.

Regards,
-- 
Ilya Kasnacheev


сб, 1 июн. 2019 г. в 23:12, Komal Chugh <20...@iitrpr.ac.in>:

> I am overriding write method of cache store and using
> FactoryBuilder.factoryOf method in the cache configuration. But I need to
> inject spring bean in the cache store implementation. I tried using
> @SpringResource by defining that bean in xml file, but there are a lot of
> nested beans which are defined using java. Is there a way I can inject a
> bean defined using java in cache store implementation?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>