@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public @interface GridUserResourceOnUndeployed
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.
Copyright © 2014. All rights reserved.