GridGain™ 2.0.3
Java API Specification

org.gridgain.grid.resources
Annotation Type GridUserResourceOnUndeployed


@Documented
@Retention(value=RUNTIME)
@Target(value=METHOD)
@Apache20LicenseCompatible
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 = null;               
                                                  
     @GridSpringApplicationContextResource        
     private ApplicationContext springCtx = null; 
     ...                                          
     @GridUserResourceOnUndeployed                  
     private void deploy() {                      
         log.info("Deploying resource: " + this);
     }                                            
     ...                                          
 }  
 

See also GridUserResourceOnDeployed for deployment callbacks.



See Also:

  Documentation
  Email Support
  Online Forums
  Issue Tracking

Author:   2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.0.3

 


GridGain™ 2.0.3
Java API Specification

GridGain™ - Grid Computing Made Simple, ver. 2.0.3.20052008
2005-2008 Copyright © GridGain Systems. All Rights Reserved.