Java 2 Enterprise Edition 1.3

Taking into consideration the disparate technologies based on the Java programming language and their application areas, the Java 2 Enterprise Edition (J2EE) is a move to combine the technologies under a common standardized architecture that lets developers leverage and mix-and-match the different technologies in Java. This makes more sense when building multi-tier enterprise applications that run on different operating systems and interact with different information sources. Multi-tier enterprise applications are inherently difficult to build, and without a standard architecture, that effort is repeated when building many enterprise applications. A standard architecture also demonstrates the validity of the concept that the different technologies will work together.

Apart from the consolidation of different technologies under one roof, the J2EE specification also defines roles and demarcates responsibilities to be undertaken when an enterprise application is being built. Because these roles map to real-life activities that need to be undertaken, the J2EE specification has found acceptance in the industry. Moreover, the J2EE specification is an industry-driven effort to standardize enterprise application architectures and to reduce the time needed to build enterprise applications.

Next you will study the different roles defined by the J2EE specification 1.3 supported by WebLogic Server 7.0.

J2EE Roles

The J2EE specification defines distinct roles based on the tasks and activities carried out when building enterprise applications. These roles can be assigned to different team members of your project or can be combined together to be carried out by the same person. It depends on the complexity of the application and the skill level of the person(s) carrying out the tasks. The different roles defined in the EJB specification are as follows:

  • Server provider The application server is the overall infrastructure environment where the containers reside. An application server contains one or more containers. The integration and communication between these containers as well as allied services required for the containers, such as transaction drivers, database drivers, resource adapters, and so on, are supplied by the server provider.

  • Container provider The actual run-time environment in which the application components are executed is the container. There can be different containers available for the different application components because the application components are based on different technologies. Servlet container and EJB container are a couple of examples of the types of containers available from a container provider. Containers provide life-cycle and support services for application components. Examples of these services are life-cycle management, connection pool management, instance pooling, transaction management, security management, and so on.

    Container providers are required to build their containers to be compliant with the J2EE specification. This ensures that application components can be built and guaranteed to execute on a container regardless of the container provider that supplies it. Essentially, the J2EE specification ensures portability of applications regardless of where they are developed and deployed. Typically, a container provider and server provider are the same entity.

  • Application component provider An application component provider develops the different components that make up the enterprise application. The application component provider can create different application components, such as JavaServer Pages/HTML files, Java Servlets, Enterprise JavaBeans, and so on. Third-party tools can be used by the application component provider to create these application components.

  • Application assembler Assembling the different application components of an enterprise application is carried out by an application assembler. Different tools are utilized by the application assembler to generate the Enterprise Application archive (.ear file), which will be used by the application server to provide a configured runtime environment based on the settings defined by the deployer in the deployment descriptor files.

  • Deployer An important role in building J2EE applications is deploying the applications. Deployment activities generally define the runtime environment for the application. Also, any declarative parameters for the J2EE application can be specified at deployment time. Generally, tasks such as virtual path mappings, transaction information and attributes definition, connection pool definition, security roles, and so on fall under the purview of a deployer. Depending on the complexity of the application, there may be a specialist deployer for the application, or developers themselves can carry out deployment activities for simple applications. Deployment information for the different components of an enterprise application is registered in a set of files called the deployment descriptor files. An application server or container reads and interprets these deployment descriptor files and configures the runtime environment for the enterprise application.

  • System administrator The responsibility of configuring and maintaining the overall infrastructure of the application server environment as well as the containers within it lies with the system administrator. The system administrator utilizes performance-monitoring and configuring tools for performing the activities defined for this role.

  • Tool provider As any experienced developer knows, tools make life much easier and simpler. Tools also improve overall productivity, resulting in shorter development cycles. Hence, the J2EE specification defines tool provider as a significant role. The different technologies that form the J2EE specification have well-defined interfaces that can be leveraged by tool providers to build tools for interacting with these technology components in a standard way. For developers this means that regardless of the tool provider from which the tools are obtained, the tools are guaranteed to interact with the technologies in a consistent way.

As you study each of the technologies covered in this book, you are going to perform the roles of the application component provider, application assembler, deployer, and system administrator at various stages of each sample application. BEA WebLogic Server performs the roles of server provider, container provider, and tool provider. There is a clear demarcation of the roles defined in the J2EE specification.

Component, Container, and Connector

As illustrated in Figure 2.1, J2EE consists of three main interlinked areas:

  • Components As you learned earlier, components are the building blocks of applications. These pieces of code perform business functions and encapsulate business rules. Components are deployed on containers and use connectors to access enterprise resources.

  • Containers Containers provide the actual execution environment for components. J2EE enables components to interact with containers in a consistent way. This ensures the portability of components across containers of different application server vendors. The containers facilitate interaction between components and connectors.

  • Connectors Connectors provide a portable and consistent API that is used by components to access enterprise resources of different vendors. Connectors plug in to containers to make this possible.

Figure 2.1. J2EE areas.

graphics/02fig01.gif

Next you will see how the different technologies that form part of the J2EE specification fall in these three areas.

From the diagram in Figure 2.2, you can see the different technologies that make up the Java 2 Enterprise Edition specification. These are

  • Java Servlet API

  • JavaServer Pages

  • Enterprise JavaBeans

  • Java Database Connectivity API

  • Java Naming and Directory Interface API

  • Java Transaction API

  • Java Message Service API

  • J2EE Connector Architecture

Figure 2.2. Block diagram of J2EE technologies.

graphics/02fig02.gif

You will take a quick overview of each of these technologies in the coming sections.



Sams Teach Yourself BEA WebLogic Server 7. 0 in 21 Days
Sams Teach Yourself BEA WebLogic Server 7.0 in 21 Days
ISBN: 0672324334
EAN: 2147483647
Year: 2002
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net