Hi, You have to use @SprintResource annotation if you want to inject something from a spring application context into Ignite’s compute task. @Autowire annotation is not supported.
Best regards, Denis > On 16 нояб. 2015 г., at 7:03, 姜 为 <[email protected]> wrote: > > I found hot to fix this, add @SpringResource to the field will work fine. > >> 在 2015年11月16日,上午9:40,姜 为 <[email protected]> 写道: >> >> Hi: >> Here is example: https://github.com/wmz7year/ignite-test >> <https://github.com/wmz7year/ignite-test> >> >> I think the IgniteUtils.wrapThreadLoader load the class is not the >> spring proxy class. >> >> Does I’m right? >> >>> 在 2015年11月14日,下午10:58,姜 为 <[email protected] >>> <mailto:[email protected]>> 写道: >>> >>> Hello, >>> >>> I’m using Ignite-Spring testing GridService rpc. >>> >>> Like this example >>> https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/servicegrid/ServicesExample.java >>> >>> <https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/servicegrid/ServicesExample.java> >>> >>> I made change for SimpleMapServiceImpl use @Autowired to other service. >>> >>> Ignite start using same SpringApplicationContext: >>> IgniteSpring.start(config, context); >>> >>> and @Autowired is success . >>> >>> But when Ignite.compute call IgniteCallable service. >>> The @Autowired service will be null. >>> >>> Is this I configured problem or Ignite issue? >>> >> >
