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

changeset 408
b0610cd08440
parent 368
0989ad8c0860
child 637
9c07ef4934dd
     1.1 --- a/src/share/jaxws_classes/javax/annotation/PreDestroy.java	Thu Sep 26 10:43:28 2013 -0700
     1.2 +++ b/src/share/jaxws_classes/javax/annotation/PreDestroy.java	Fri Oct 04 16:21:34 2013 +0100
     1.3 @@ -37,18 +37,38 @@
     1.4   * supported by all container managed objects that support PostConstruct
     1.5   * except the application client container in Java EE 5. The method on which
     1.6   * the PreDestroy annotation is applied MUST fulfill all of the following
     1.7 - * criteria:<ul>
     1.8 - * <li>The method MUST NOT have any parameters except in the case of EJB
     1.9 - * interceptors in which case it takes an InvocationContext object as defined
    1.10 - * by the EJB specification.</li>
    1.11 - * <li>The return type of the method MUST be void.</li>
    1.12 - * <li>The method MUST NOT throw a checked exception.</li>
    1.13 + * criteria:
    1.14 + * <p>
    1.15 + * <ul>
    1.16 + * <li>The method MUST NOT have any parameters except in the case of
    1.17 + * interceptors in which case it takes an InvocationContext object as
    1.18 + * defined by the Interceptors specification.</li>
    1.19 + * <li>The method defined on an interceptor class MUST HAVE one of the
    1.20 + * following signatures:
    1.21 + * <p>
    1.22 + * void &#060;METHOD&#062;(InvocationContext)
    1.23 + * <p>
    1.24 + * Object &#060;METHOD&#062;(InvocationContext) throws Exception
    1.25 + * <p>
    1.26 + * <i>Note: A PreDestroy interceptor method must not throw application
    1.27 + * exceptions, but it may be declared to throw checked exceptions including
    1.28 + * the java.lang.Exception if the same interceptor method interposes on
    1.29 + * business or timeout methods in addition to lifecycle events. If a
    1.30 + * PreDestroy interceptor method returns a value, it is ignored by
    1.31 + * the container.</i>
    1.32 + * </li>
    1.33 + * <li>The method defined on a non-interceptor class MUST HAVE the
    1.34 + * following signature:
    1.35 + * <p>
    1.36 + * void &#060;METHOD&#062;()
    1.37 + * </li>
    1.38   * <li>The method on which PreDestroy is applied MAY be public, protected,
    1.39   * package private or private.</li>
    1.40   * <li>The method MUST NOT be static.</li>
    1.41   * <li>The method MAY be final.</li>
    1.42   * <li>If the method throws an unchecked exception it is ignored except in the
    1.43   * case of EJBs where the EJB can handle exceptions.</li>
    1.44 + * </ul>
    1.45   *
    1.46   * @see javax.annotation.PostConstruct
    1.47   * @see javax.annotation.Resource

mercurial