ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sijusuresh <sijusur...@gmail.com>
Subject Spring Bean Injection To IgniteRunnable Implementation
Date Fri, 18 Aug 2017 05:07:00 GMT
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.

Mime
View raw message