001 package javax.portlet.faces.annotation; 002 003 import java.lang.annotation.ElementType; 004 import java.lang.annotation.Retention; 005 import java.lang.annotation.RetentionPolicy; 006 import java.lang.annotation.Target; 007 008 /** The PreDestroy annotation is used on methods as a callback notification to signal 009 * that the instance is in the process of being removed by the bridge from 010 * the bridge request scope. This method complements one using 011 * <code>javax.annotation.PreDestroy</code> to allow the object to release resources 012 * that it has been holding. It exists because the existing 013 * <code>javax.annotation.PreDestroy</code> method must be ignored as it is called 014 * by the container even though the bridge continues to manage the object in its 015 * request scope. The method on which the PreDestroy annotation is applied MUST 016 * fulfill all of the following criteria - The method MUST NOT have any parameters - 017 * The return type of the method MUST be void. - The method MUST NOT throw a checked 018 * exception. - The method on which PreDestroy is applied MUST be public. - The 019 * method MUST NOT be static. - The method MAY be final. - If the method throws an 020 * unchecked exception it is ignored. 021 */ 022 023 @Retention(RetentionPolicy.RUNTIME) 024 @Target({ElementType.METHOD}) 025 public @interface BridgePreDestroy { 026 }