Describing AS Java

Objectives

After completing this lesson, you will be able to:
  • Describe the processing of user requests in AS Java based SAP systems
  • List the processes of an AS Java and explain their use
  • List the main tools for the administration of AS Java and outline their use

Definition of Terms

AS Java implements a Java EE server. The following table shows the release dependencies:

AS Java Release Dependencies

AS JavaEnterprise EditionJDKSAP JVM
7.50Java EE 58 (1.8.0)8.1
7.20, 7.30, 7.31, 7.40Java EE 56 (1.6.0)6.1
7.10, 7.11, 7.20Java EE 55.0 (1.5.0)5.1
7.00, 7.01, 7.02, 7.03J2EE 1.31.4.24.1
6.40J2EE 1.31.4.24.1

Concerning the explanation:

AS Java

Application Server Java, runtime environment by SAP, providing the infrastructure for Java applications

Enterprise Edition

Officially Java Platform, Enterprise Edition: Specifications for developing and operating company-specific application

JDK

Java Development Kit: Software development kit developed by Sun/Oracle Java applications

JRE

Java Runtime Environment: Runtime environment Java applications

SAP JVM

SAP Java Virtual Machine: Certified JVM/JDK provided by SAP for SAP applications

Request Processing in AS Java

The processing of a user request in AS Java, as outlined in the following figure involves different processes on all three layers (presentation, application, and database layer).

The image explains the core elements of the typical three-layer architecture used by Java-based SAP systems. It starts on top with the Presentation layer, typically using supported Web Browsers or, alternatively, the SAP Business Client for Windows (only when Enterprise Portal is used as a product). The middle layer is built by the Application, which provides the runtime for Java programs. Be aware of the fact that the SAP Central Services (SCS) instance is not shown here. Finally, the Database layer (as a persistency layer) is shown at the bottom.

A web browser is the standard user interface for AS Java. A user request for AS Java is usually an HTTP(S) request that is received by the ICM. The ICM process forwards the processing requests to one of the server processes of its application server.

The actual processing takes place in the server process, whereby the user who sent the request is usually assigned the same server process again for the next request.

The server processes of AS Java are also called nodes. All processes of AS Java, together with the database schema, form the Java cluster. In contrast to the work processes of the AS ABAP, the server processes of the AS Java are multi-threaded. This means that a server process consists of many threads, and one request can be processed in each thread. One server process can therefore process many user requests in parallel.

To process user requests, it is often necessary to read data from the Java schema of the database or to write to it. To do so, each server process is connected multiple times to the Java schema of the database via a connection pool (DB pool).

Once processing is complete, the processing result from the server processes is returned to the web browser via the ICM.

The buffers help to speed up the processing of user requests. This means that the data does not have to be read from the database every time it is needed, but can be called very quickly from the buffer. Each server process has its own buffer.

The server processes are split into different functional modules called managers and services. The managers form the Java Enterprise Runtime. The Java Enterprise Runtime provides basic core functions of AS Java. Alternatively known as a kernel.

Together with the interfaces and libraries, the services are called Java EE Engine Components. The Java EE Engine Components provide programming interfaces (APIs) to the applications; the applications can then use these APIs to access the AS Java functions.

In the case of an HTTP request, the ICM process uses a Java EE handler to forward the request to a server process of this application server.

The cluster manager of the server process receives the request and forwards it to the HTTP provider service. In the web container service, the presentation logic of the application is then processed. The web container service provides the processing of servlets and JavaServer Pages (JSP). The business structure logic of the application is processed in the form of EJB beans in the EJB Container Service. If, in the processing of the request, data from the database is required, the JDBC Connector Service is used to establish a connection to the database, and the data is requested there. If the same table content has already been queried by this server process, the content of the table buffer can be queried at the application level (if buffering is permitted for the table).

The response to the web browser using HTTP is then returned in the same way.

Transactional Processing in AS Java

The ACID concept has now been implemented in AS Java in the same way as in AS ABAP. In AS Java, the Transaction Service is responsible for managing transactions. The two Java EE standards Java Transaction API (JTA) and Java Transaction Service (JTS) are implemented using the Transaction Service. Applications (application developers) can use the Java Transaction Service with the JTA interface.

In the Java EE standard, much of the implementation of the transaction logic is left to the respective database used. Hence, a transaction at the application level often corresponds exactly to one database transaction in the Java EE standard. The following video illustrates the correlation using a JSP application as an example.

In AS Java, changes and entries in the user interface (in the web browser) are not made persistent immediately in the database. When the user saves their entries, the Java transaction is completed immediately and the data is made persistent in a database transaction. A Java transaction thus consists of a database transaction.

Persistence

SAP has created Open SQL for Java framework for AS Java. Hence, Java application developers have access to various database-independent programming techniques as well as important functions for improved performance and troubleshooting.

In Java programming, a wide range of database access methods exist like JDBC, SQLJ, EJB, and JDO. All of these methods are able to take advantage of the AS Java Buffer, which is allocated on the Application Layer, but caches frequently used metadata stored in the underlying Database. There is only one exception when this buffer cannot be used: if Native SQL is addressed in the programming of Java.

If the Java program is supposed to be portable, that is, run with a database other than the one used originally, developers can choose between Open SQL/JDBC, Open SQL/SQLJ, EJB (Enterprise JavaBeans), and JDO (Java Data Objects). If developers use Native SQL in the program, they lose portability and cannot use the table buffer of the Open SQL Java Frameworks.

Lock Management

The lock concept of the database is used in the Java EE standard. So if application developers make sure that they implement database-independent database accesses, the application will be portable but will respond semantically different on different database platforms. For this reason and to improve response times, SAP introduced the concept of the enqueue service analogous to AS ABAP.

If a user wants change access to data, the executing server process requests a lock (to do so, the application developer must program this request explicitly).

AS Java Administration

There are also various administration tools available for AS Java. Some of these tools are listed in the following figure.

There are multiple tools when it comes to administrative tasks done in a Java-based SAP system. The core tool is called SAP NetWeaver Administrator and is web-based. As an alternative, you are able to use the Config Tool on the operating system level. Additionally, there are further tools like the Identity Management (web-based) and an emergency tool using a shell (Shell Console Administrator).

SAP NetWeaver Administrator combines the most important administration and monitoring tools for AS Java systems in a browser-based user interface. For AS Java, SAP NetWeaver Administrator marks the changeover from various different expert tools to an integrated, simple, and clear solution. In addition to this, SAP NetWeaver Administrator completes the integration of the data sources for monitoring. To start the SAP NetWeaver Administrator, you can enter the following URL in the Web browser: https://<host name>:<port number>/nwa

  • <host name>: The fully qualified server name on which the AS Java is installed.

  • <port number>: The HTTPS port of the ICM (Internet Communication Manager). Syntax: 5<Java instance number>01. If the number of the Java instance is 91, for example, the port number will be 59101. The application server you use to call SAP NetWeaver Administrator is irrelevant. It can be used to administer the entire AS Java system.

SAP NetWeaver Administrator is divided into the following functional areas:

Functional Areas of SAP NetWeaver Administrator

  • Availability and performance (for example, system overview, resource monitoring, process monitoring)

  • Operations (for example, application manager, start and stop)

  • Configuration (for example, licenses, AS Java system properties, log configuration)

  • Error analysis (for example, SAP system information, Java class loader, viewer)

  • SOA (for example, destinations, JCo RFC provider)

Hint

To work with SAP NetWeaver Administrator, the system user requires the following authorizations:

  • NWA_READONLY (read authorization)

  • NWA_SUPERADMIN (write authorization for starting and stopping, configuration changes, and so on)

In AS Java, the User Management Engine (UME) provides the required functions for managing user master records. You can use the UME to set up and operate user and authorization concepts for AS Java. The UME has its own administration console for user management (Identity Management or UME console, see the figure above). It allows the administrator to perform the routine tasks of user administration, such as creating users and groups, role assignment, and other actions. Security settings can be used to define password policies, such as minimum password length and the number of incorrect logon attempts before a user is locked.

Note

The Visual Administrator is a graphic user interface (GUI) that enables the administration of all Java cluster elements (Java dispatcher, Java server) and all the modules running on them. It enables remote monitoring and remote configuration of Java's manager, services, interfaces, and libraries in one single interface. This tool is no longer available as of AS Java 7.10. The Visual Administrator has been replaced by the SAP NetWeaver Administrator.

The Config Tool enables the offline configuration of the cluster elements of Java. It enables you to add and configure the properties of the individual Java cluster elements.

The Java Shell Console Administrator is a powerful expert tool for managing, monitoring, and troubleshooting SAP's Java-based application server environment. For example, deploy, undeploy, and manage Java applications or components running on the SAP Java stack.

Hint

For more information, see the online documentation which is available on SAP Help Portal (https://help.sap.com) and the SAP course: ADM800: AS Java – Administration.

Manage Locks

Business Example

You want to monitor which locks are held in an SAP system on the basis of an AS Java.

Learn about how lock administration works in the AS Java.