I'm trying to inject a Spring Bean in IgniteRunnable which returns null.

1) Starting ignite using IgniteSpring  passing Spring Application Context.
2) In IgniteService using SchedulerFuture creating a task to run every 5
minutes
3) Task class which implements IgniteRunnable refer a Spring bean from the
context. Reference coming as NULL.Tried using @SpringResource alsoreturning
NULL in this case too.

public class FetchMetadataTask implements IgniteRunnable{

        @SpringApplicationContextResource 
        private ApplicationContext appCtx; 

        @Override 
        public void run() {
        MetaDataService metadataService =
appCtx.getBean(MetaDataService.class);
        log.debug("FetchMetadataTask 
$MetaDataService........................"+metadataService);
    } 
}



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Spring-Bean-Injection-To-IgniteRunnable-Implementation-tp16275.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to