GridGain™ 4.3.1e
Enterprise "Big Data" Edition

org.gridgain.grid.resources
Annotation Type GridUserResourceOnUndeployed


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

Annotates a special method inside injected user-defined resources GridUserResource. This annotation is typically used to de-initialize user-defined resource. For example, the method with this annotation can close database connection, or perform certain cleanup. Note that this method will be called before any injected resources on this user-defined resource are cleaned up.

Here is how annotation would typically happen:

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

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

See also GridUserResourceOnDeployed for deployment callbacks.

 


GridGain™ 4.3.1e
Enterprise "Big Data" Edition

GridGain - In-Memory Big Data
Enterprise "Big Data" Edition, ver. 4.3.1e.10112012
2012 Copyright © GridGain Systems
Follow us:   Follow GridGain on Github Join GridGain User Group Follow GridGain on Twitter Follow GridGain on Vimeo