GridGain™ 3.6.0e
Enterprise 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.

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