The development of NetBeans IDE 6.0 is done in close collaboration with the Java EE and Glassfish Workgroup, which implements the perfect integration with the new Java EE 5 specification, making it easy to use the new specification in this IDE. NetBeans IDE 6.0 is the best way to quickly learn Java EE 5 programming and work with it efficiently.
This document describes some of the key concepts of the Java EE 5 specification and how they relate to your current programming project. This article describes the following topics:
Callout replaces deployment descriptor
Simplified development of EJB software
Using dependency injection to access resources
Java Persistence API Model
WEB Services
You can find information about developing Java EE 5 applications and deploying the application on Sun Java System application Server Platform Edition 9 in the Java EE 5 Tutorial.
Callout replaces deployment descriptor
The Java EE 5 platform simplifies the deployment process by requiring no deployment descriptors (except for the deployment descriptor Web.xml files required by the Servlet specification). Other deployment descriptors, such as Ejb-jar.xml and Web service-related entries in Web.xml, are obsolete. Java EE 1.4 Department descriptors are often complex, making it easy to make mistakes when populating them. However, the Java EE 5 platform uses "annotations". A callout is a Java modifier similar to the public and private specified in your code. For example, the EJB 3 specification (a subset of the Java EE 5 specification) defines annotations for Bean types, interface types, resource references, transaction attributes, security, and so on. The JAX-WS 2.0 specification provides a similar set of annotations for WEB services. Some annotations are used to generate artifacts, others are used to describe code, and some annotations are used to provide enhanced services, such as security or runtime-specific logic. In summary, the Java EE 5 platform provides annotations for the following tasks (and other tasks):
Defining and using WEB services
Developing EJB software applications
Mapping Java technology classes to XML
Mapping Java technology classes to a database
Mapping a method to an action
Specify external dependencies
Specify deployment information, including security properties
Callouts are marked with the @ character. In the IDE, when you create a type that uses annotations in Java EE 5, the relevant placeholders are provided in the generated code. For example, when you use the IDE to create a stateless session Bean, the following code is generated, including the @Stateless () callout:
package mypackage;
import javax.ejb.*;
@Stateless()
public class HelloWorldSessionBean implements mypackage.HelloWorldSessionLocal {
}
With code completion, you can access the callout property of the item under the cursor. For example, when you press CTRL + SPACEBAR in parentheses in the @WebService () callout, you see the following:
Each property has a default value. Therefore, you do not have to specify any properties unless you need to use a value other than the default value. In some simple examples, it's OK to use the default value, which means you don't need to provide the property at all.