6 Developing Applications in WebLogic Server

WebLogic Server implements Java Platform, Enterprise Edition (Java EE) Version 7.0 technologies. Java EE is the standard platform for developing multitier enterprise applications based on the Java programming language.

This chapter includes the following topics:

WebLogic Server and the Java EE Platform

With Java EE, development of Java enterprise applications has never been easier or faster. The aim of the Java EE platform is to provide developers with a powerful set of APIs while shortening development time, reducing application complexity, and improving application performance. The technologies that make up Java EE were developed collaboratively by several software vendors. For background information on Java EE 7 application development, refer to the Java EE 7 Tutorial at: http://docs.oracle.com/javaee/7/tutorial.

An important aspect of the Java EE programming model is the introduction of metadata annotations. Annotations simplify the application development process by allowing a developer to specify within the Java class itself how the application component behaves in the container, requests for dependency injection, and so on. Annotations are an alternative to deployment descriptors that were required by older versions of enterprise applications (Java EE 1.4 and earlier).

Starting in Java EE 5 and continuing in Java EE 7, the focus has been ease of development. There is less code to write – much of the boilerplate code has been removed, defaults are used whenever possible, and annotations are used extensively to reduce the need for deployment descriptors.

  • EJB 3.2 provides simplified programming and packaging model changes. The mandatory use of Java interfaces from previous versions has been removed, allowing plain old Java objects to be annotated and used as EJB components. The simplification is further enhanced through the ability to place EJB modules directly inside web applications, removing the need to produce archives to store the web and EJB components and combine them together in an EAR file.

  • Java EE 7 includes simplified web services support and the latest web services APIs, making it an ideal implementation platform for Service-Oriented Architectures (SOA).

  • Constructing web applications is made easier with JavaServer Faces (JSF) technology and the JSP Standard Tag Library (JSTL). Java EE 7 supports rich thin-client technologies such as AJAX, for building applications for Web 2.0.

WebLogic Server Java EE applications are based on standardized, modular components. WebLogic Server provides a complete set of services for those modules and handles many details of application behavior automatically, without requiring programming. Java EE defines module behaviors and packaging in a generic, portable way, postponing runtime configuration until the module is actually deployed on an application server.

Java EE includes deployment specifications for web applications, EJB modules, web services, enterprise applications, client applications, and connectors. Java EE does not specify how an application is deployed on the target server—only how a standard module or application is packaged. For each module type, the specifications define the files required and their location in the directory structure.

Java is platform independent, so you can edit and compile code on any platform, and test your applications on development WebLogic Servers running on other platforms. For example, it is common to develop WebLogic Server applications on a PC running Windows or Linux, regardless of the platform where the application is ultimately deployed.

For more information, refer to the Java EE specification at: http://www.oracle.com/technetwork/java/javaee/tech/index-jsp-142185.html.

Overview of Java EE Applications and Modules

At runtime, a Java EE application is a type of module. A WebLogic Server Java EE application consists of one of the following modules or applications running on WebLogic Server:
  • Web application modules—HTML pages, servlets, JavaServer Pages, and related files. See Web Application Modules in Developing Applications for Oracle WebLogic Server.

  • Enterprise Java Beans (EJB) modules—entity beans, session beans, and message-driven beans. See Enterprise JavaBean Modules in Developing Applications for Oracle WebLogic Server.

  • Connector modules—resource adapters. See Connector Modules in Developing Applications for Oracle WebLogic Server.

  • Enterprise applications—web application modules, EJB modules, resource adapters and web services packaged into an application. See Enterprise Applications in Developing Applications for Oracle WebLogic Server.

  • Web services—See WebLogic Web Services in Developing Applications for Oracle WebLogic Server.

A WebLogic application can also include the following WebLogic-specific modules:

Roadmap for Developing Applications in WebLogic Server

The WebLogic Server documentation set includes several introductory, procedural, and reference topics, including examples, that help you understand how to develop Java EE applications on WebLogic Server.

Table 6-1 Roadmap for Developing Applications in WebLogic Server

Major Task Subtasks and Additional Information

Learning more about application development

Setting up your development environment

Designing your application

Building your application

Using development tools

Moving your application to a production environment

Application examples

Java EE API programming guides

Javadoc and API reference

General reference