6 Developing Applications in WebLogic Server

This chapter describes application development in WebLogic Server 12.1.3.

This chapter includes the following sections:

WebLogic Server and the Java EE Platform

WebLogic Server implements Java Platform, Enterprise Edition (Java EE) Version 6.0 technologies (see http://www.oracle.com/technetwork/java/javaee/overview/index.html). Java EE is the standard platform for developing multi-tier enterprise applications based on the Java programming language. The technologies that make up Java EE were developed collaboratively by several software vendors. For background information on Java EE 6 application development, refer to the Java EE 6 Tutorial at: http://docs.oracle.com/javaee/6/tutorial/doc/.

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 6, 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.1 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 of 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 6 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 6 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 run-time 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

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

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