src/share/jaxws_classes/javax/annotation/PreDestroy.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 408
b0610cd08440
equal deleted inserted replaced
366:8c0b6bccfe47 368:0989ad8c0860
1 /* 1 /*
2 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
35 * container. The method annotated with PreDestroy is typically used to 35 * container. The method annotated with PreDestroy is typically used to
36 * release resources that it has been holding. This annotation MUST be 36 * release resources that it has been holding. This annotation MUST be
37 * supported by all container managed objects that support PostConstruct 37 * supported by all container managed objects that support PostConstruct
38 * except the application client container in Java EE 5. The method on which 38 * except the application client container in Java EE 5. The method on which
39 * the PreDestroy annotation is applied MUST fulfill all of the following 39 * the PreDestroy annotation is applied MUST fulfill all of the following
40 * criteria - 40 * criteria:<ul>
41 * - The method MUST NOT have any parameters except in the case of EJB 41 * <li>The method MUST NOT have any parameters except in the case of EJB
42 * interceptors in which case it takes an InvocationContext object as defined 42 * interceptors in which case it takes an InvocationContext object as defined
43 * by the EJB specification. 43 * by the EJB specification.</li>
44 * - The return type of the method MUST be void. 44 * <li>The return type of the method MUST be void.</li>
45 * - The method MUST NOT throw a checked exception. 45 * <li>The method MUST NOT throw a checked exception.</li>
46 * - The method on which PreDestroy is applied MAY be public, protected, 46 * <li>The method on which PreDestroy is applied MAY be public, protected,
47 * package private or private. 47 * package private or private.</li>
48 * - The method MUST NOT be static. 48 * <li>The method MUST NOT be static.</li>
49 * - The method MAY be final. 49 * <li>The method MAY be final.</li>
50 * - If the method throws an unchecked exception it is ignored except in the 50 * <li>If the method throws an unchecked exception it is ignored except in the
51 * case of EJBs where the EJB can handle exceptions. 51 * case of EJBs where the EJB can handle exceptions.</li>
52 * 52 *
53 * @see javax.annotation.PostConstruct 53 * @see javax.annotation.PostConstruct
54 * @see javax.annotation.Resource 54 * @see javax.annotation.Resource
55 * @since Common Annotations 1.0 55 * @since Common Annotations 1.0
56 */ 56 */

mercurial