Skip to main content
This revision made February 14, 2013 22:28, by Rajiv Mordani

Common Annotations for the Java Platform 1.2 Maintenance Release

1. Add new annotation – javax.annotation.Priority in section 2.7 defined as follows:


The Priority annotation can be applied to classes to indicate in what order the classes should be used. The effect of using the Priority annotation in any particular instance is defined by other specifications that define the use of a specific class.

For example, the Interceptors specification defines the use of priorities on interceptors to control the order in which interceptors are called.

Priority values should generally be non-negative, with negative values reserved for special meanings such as "undefined" or "not specified". A specification that defines use of the Priority annotation may define the range of allowed priorities and any priority values with special meaning.

 package javax.annotation;
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 import static java.lang.annotation.RetentionPolicy.*;
 @Target({TYPE}) 
 @Retention(RUNTIME)
 @Documented
 public @interface Priority {
    /**
     * The priority value.
     */
    int value();
 } 

2. Update Resource annotation as follows:


Return Class<?> from Resource.type() instead of the raw Class type.

3. Update Section 2.14 javax.annotation.sql.DataSourceDefinition with the following:


Replace the following paragraph (2nd paragraph in the section)

"The url property should not be specified in conjunction with other standard properties for defining the connectivity to the database. If the url property is specified along with other standard DataSource properties such as serverName and portNumber, the more specific properties will take precedence and url will be ignored."

with

"DataSource properties should not be specified more than once. If the url annotation element contains a DataSource property that was also specified using the corresponding annotation element or was specified in the properties annotation element, the precedence order is undefined and implementation specific"

4. Update Table 2-9 "url element description as follows:


"A JDBC URL. If the url annotation element contains a DataSource property that was also specified using the corresponding annotation element, the precedence order is undefined and implementation specific."

Difference compared to previous revision
= Common Annotations for the Java Platform 1.2 Maintenance Release = == 1. Add new annotation – '''javax.annotation.Priority''' in section 2.7 defined as follows: The Priority annotation can be applied to classes to indicate in what order the classes should be used. The effect of using the Priority annotation in any particular instance is defined by other specifications that define the use of a specific class. ... */ int value(); } == 2. Update Resource annotation as follows: Return Class from Resource.type() instead of the raw Class type. == 3. Update Section 2.14 javax.annotation.sql.DataSourceDefinition with the following: Replace the following paragraph (2nd paragraph in the section) ... with "DataSource properties should not be specified more than once. If the url annotation element contains a DataSource property that was also specified using the corresponding annotation element or was specified in the properties annotation element, the precedence order is undefined and implementation specific"== 4. Update Table 2-9 "url element description as follows: "A JDBC URL. If the url annotation element contains a DataSource property that was also specified using the corresponding annotation element, the precedence order is undefined and implementation specific."
 
 
Close
loading
Please Confirm
Close