org.apache.ignite.resources

## Annotation Type MBeanServerResource

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

Annotates a field or a setter method for injection of `MBeanServer` resource. MBean server is provided to grid via `IgniteConfiguration`.

MBean server can be injected into instances of following classes:

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

Here is how injection would typically happen:

     public class MyGridJob implements ComputeJob {
          ...
          @IgniteMBeanServerResource
          private MBeanServer mbeanSrv;
          ...
      }

or

     public class MyGridJob implements ComputeJob {
         ...
         private MBeanSever mbeanSrv;
         ...
         @IgniteMBeanServerResource
         public void setMBeanServer(MBeanServer mbeanSrv) {
              this.mbeanSrv = mbeanSrv;
         }
         ...
     }

See `IgniteConfiguration.getMBeanServer()` for Grid configuration details.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0
Release Date | : March 31 2015