0N/A/*
3679N/A * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
0N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
1472N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1472N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
0N/A * or visit www.oracle.com if you need additional information or have any
0N/A * questions.
0N/A */
1879N/A
4141N/Apackage javax.annotation;
4141N/A
1879N/Aimport java.lang.annotation.*;
1879N/Aimport static java.lang.annotation.ElementType.*;
1879N/Aimport static java.lang.annotation.RetentionPolicy.*;
1879N/A
1879N/A/**
1879N/A * The PreDestroy annotation is used on methods as a callback notification to
1879N/A * signal that the instance is in the process of being removed by the
1879N/A * container. The method annotated with PreDestroy is typically used to
1879N/A * release resources that it has been holding. This annotation MUST be
1879N/A * supported by all container managed objects that support PostConstruct
1879N/A * except the application client container in Java EE 5. The method on which
1879N/A * the PreDestroy annotation is applied MUST fulfill all of the following
1879N/A * criteria -
1879N/A * - The method MUST NOT have any parameters except in the case of EJB
1879N/A * interceptors in which case it takes an InvocationContext object as defined
1879N/A * by the EJB specification.
1879N/A * - The return type of the method MUST be void.
0N/A * - The method MUST NOT throw a checked exception.
0N/A * - The method on which PreDestroy is applied MAY be public, protected,
0N/A * package private or private.
0N/A * - The method MUST NOT be static.
0N/A * - The method MAY be final.
0N/A * - If the method throws an unchecked exception it is ignored except in the
0N/A * case of EJBs where the EJB can handle exceptions.
0N/A *
263N/A * @see javax.annotation.PostConstruct
263N/A * @see javax.annotation.Resource
263N/A * @since Common Annotations 1.0
263N/A */
263N/A
263N/A@Documented
0N/A@Retention (RUNTIME)
0N/A@Target(METHOD)
0N/Apublic @interface PreDestroy {
0N/A}
0N/A