Java EE: Overview
Using the Java™ Platform, Enterprise Edition (Java EE) architecture, you can build distributed Web and enterprise applications. This architecture helps you focus on presentation and application issues, rather than on systems issues.
You can use the Java EE tools and features to create applications that are structured around modules with different purposes, such as Web sites and Enterprise Java beans (EJB) applications. When you use EJB 3.0 components, you can create a distributed, secure application with transactional support. When you develop applications that access persistent data, you can use the new Java Persistence API (JPA). This standard simplifies the creation and use of persistent entities, as well as adding new features. For developing presentation logic, you can use technologies such as JavaServer Pages (JSP) or JavaServer Faces (JSF).
Using the Java EE Platform Enterprise Edition (Java EE), you can develop applications more quickly and conveniently than in previous versions. Java EE significantly enhances ease of use providing
- Reduced development time
- Reduced application complexity
- Improved application performance
Java EE provides a simplified programming model, including the following tools:
- Inline configuration with annotations, making deployment descriptors now optional
- Dependency injection, hiding resource creation and lookup from application code
- Java persistence API (JPA) allows data management without explicit SQL or JDBC
- Use of plain old Java objects (POJOs) for Enterprise Java beans and Web services
Java EE provides simplified packaging rules for enterprise applications:
- Web applications use .WAR files
- Resource adapters use .RAR files
- Enterprise applications use .EAR files
- The lib directory contains shared .JAR files
- A .JAR file may be specified in an EAR's application.xml either as an application client or as an EJB module
- A .JAR file not specified by an EAR's application.xml is defined as follows:
- A .JAR file with an application-client.xml implies an application client
- A .JAR file with an ejb-jar.xml implies an EJB module
- A .JAR file with META-INF/MANIFEST.MF specified Main-Class implies an application client
- A .JAR file with any @Stateless, @Stateful, or @MessageDriven annotations implies an EJB application
- A .JAR file with Main-Class implies an application client
- A .JAR file with @Stateless annotation implies an EJB application
- Many simple applications no longer require deployment descriptors, including
- EJB applications (.JAR files)
- Web applications that use JSP technology only
- Application clients
- Enterprise applications (.EAR files)
Java EE provides simplified resource access using dependency injection:
- In the Dependency Injection pattern, an external entity automatically supplies an object's dependencies.
- The object need not request these resources explicitly
- In Java EE, dependency injection can be applied to all resources that a component needs
- Creation and lookup of resources are hidden from application code
- Dependency injection can be applied throughout Java EE technology:
- EJB containers
- Web containers
- Clients
- Web services
Related concepts
Developing Java EE Applications
Creating and configuring Java EE modules using annotations
Securing enterprise applications
Related tasks
Creating Java EE projects using wizards
Validating code in enterprise applications
Deploying Java EE applications
Migrating the specification level of Java EE projects