GridGain™ 3.6.0e
Enterprise Edition

org.gridgain.grid.resources
Annotation Type GridUserResourceOnDeployed


@Documented
@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface GridUserResourceOnDeployed

Annotates a special methods inside injected user-defined resource GridUserResource. It can be used in any injected resource for grid tasks and grid jobs. Typically the method with this annotation will be used for initialization of the injectable resource such as opening database connection, network connection or reading configuration settings. Note that this method is called after the resource itself has been injected with all its resources, if any.

Here is how annotation would typically happen:

 public class MyUserResource {
     ...
     @GridLoggerResource
     private GridLogger log;

     @GridSpringApplicationContextResource
     private ApplicationContext springCtx;
     ...
     @GridUserResourceOnDeployed
     private void deploy() {
         log.info("Deploying resource: " + this);
     }
     ...
 }
 

See also GridUserResourceOnUndeployed for undeployment callbacks.

Wiki & Forum:


Wiki
Forum

 


GridGain™ 3.6.0e
Enterprise Edition

GridGain - Real Time Big Data
Enterprise Edition, ver. 3.6.0e.13012012
2012 Copyright © GridGain Systems
Follow us:   Follow GridGain on Github Follow GridGain on Facebook Join GridGain User Group Follow GridGain on Twitter Follow GridGain on YouTube