org.apache.ignite.resources

## Annotation Type SpringApplicationContextResource

    @Documented
    @Retention(value=RUNTIME)
    @Target(value={METHOD,FIELD})
    public @interface SpringApplicationContextResource

Annotates a field or a setter method for injection of Spring ApplicationContext resource. When Ignite starts using Spring configuration, the Application Context for Spring Configuration is injected as this resource. method.

Spring Application Context can be injected into instances of following classes:

- `ComputeTask`
- `ComputeJob`
- `IgniteSpi`
- `LifecycleBean`

Here is how injection would typically happen:

     public class MyGridJob implements ComputeJob {
          ...
          @SpringApplicationContextResource
          private ApplicationContext springCtx;
          ...
      }

or

     public class MyGridJob implements ComputeJob {
         ...
         private ApplicationContext springCtx;
         ...
         @SpringApplicationContextResource
         public void setApplicationContext(MBeanServer springCtx) {
              this.springCtx = springCtx;
         }
         ...
     }

For information about Spring framework visit www.springframework.org

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.6.0
Release Date | : May 18 2016