Java News from Thursday, November 3, 2005

Sun's posted the proposed final draft of JSR-250 Common Annotations for the Java™ Platform. Proposed annotations include:

automatically generated code that has not been written by a human being; e.g. the GUI code generated by NetBeans
"used to declare a reference to a resource. It can be specified on a class, methods or on fields. When the annotation is applied on a field or method, the container will inject an instance of the requested resource into the application when the application is initialized. If the annotation is applied to a class, the annotation declares a resource that the application will look up at runtime."
"Since repeated annotations are not allowed, the Resources annotation acts as a container for multiple resource declarations."
"a method that needs to be executed after dependency injection is done to perform any initialization."
"used on methods as a callback notification to signal that the instance is in the process of being removed by the container. The method annotated with PreDestroy is typically used to release resources that it has been holding."
"defines the role of the application during execution in a Java EE container. It can be specified on a class. This allows developers to execute an application under a particular role."
"specifies the security roles permitted to access method(s) in an application."
"specifies that all security roles are allowed to invoke the specified method(s), that is, that the specified method(s) are “unchecked”. It can be specified on a class or on methods. Specifying it on the class means that it applies to all methods of the class. If specified at the method level, it only affects that method."
"specifies that no security roles are allowed to invoke the specified method(s), that is, that the method(s) are to be excluded from execution in the Java EE container."

Java 1.5 or later will be required for this to work.