Java instance in sap

SAP BASIS TUTORIALS

As of SAP Web Application Server 6.20, you have the option of using Java as well as The ABAP programming language. You should therefore familiarize yourself with the Fundamental concepts of the Java environment.

The Java programming language was first introduced in 1995 by Sun Microsystems Inc.™. Java is an object-oriented and platform-independent programming language that has spread across many areas. The powerful concept of Java allows the development of a large number of different types of application — from the classic application using applets implemented in Web pages to client/server applications.

program can be executed on any system for which a Java Runtime Environment (JRE) is available. In particular, Java applications can run on different systems that are based on different hardware. Java can be used to create programs for UNIX, Microsoft Windows, Linux, MacOS, or OS/2, for workstations or servers; for x86, MIPS, Alpha, or Sparc; for computers, organizers, or cell phones, and for the microcomputers built into household and industry devices, such as washing machines, video recorders, cars, and traffic lights.

Java applications are computer programs with the full functional range also provided by other programming languages. Applications can run as local programs on the user’s computer or as client/server systems across the Internet or using an Intranet, or as server programs (servlets, CGI programs) on a Web

Читайте также:  Html css javascript coding

The term applet essentially means «little application». It usually means a Java applet, a small computer program that runs in a Web browser and is written in the Java programming language. Java applets are intended for execution within the Java Runtime Environment of a browser. They are transferred (as is also the case, for example, with embedded images) with the HTML page using the HTTP protocol, and then executed on the client computer. Special security guidelines apply to Java applets; that is, they are not permitted to perform everything on the client that locally-installed programs are permitted to. In this way, for example, they can only create network connections to the host from which they were downloaded.

Note : JavaScript is completely unrelated to Java. JavaScript is a script language that can be embedded in HTML and, with some Web browsers (Netscape, Microsoft Internet Explorer), produces the execution of certain functions and actions within the Web browser. JavaScript was developed with the intention of dynamically organizing static HTML pages. Unlike server-side script languages such as Perl or PHP, JavaScript is executed on the client. In contrast to Java, JavaScript is not an independent programming language, is not independent of the browser version, and does not have the required security mechanisms.

JVM (JAVA VERTUAL MACHINE) executes the platform independent byte code generated by the java compiler on the relevant hardware.

Initially, Java is a programming language like any other. Unlike traditional compilers for a programming language, which generate machine code for a specific platform (see the Compiled Programming Languages figure),

Читайте также:  Html form input onclick javascript

Источник

Java Instance

A Java instance is a unit in the AS Java cluster which is identified by its instance number. The elements that form an instance run on one physical machine. Also, it is possible to run several instances on one physical machine, but it is recommended that you split the different instances among different physical machines.

A Java Instance consists of:

Internet Communication Manager

The ICM is an element of the Java instance which handles requests coming from clients and dispatches them to the available server processes. Data is transferred from the ICM to the server processes and vice versa using the Fast Channel Architecture (FCA), which allows fast and reliable communication between them.

The ICM reads the request from the TCP/IP stack into the FCA, decides which server process should handle the request (load balancing), and then sends the requests directly to the individual process. The required information for load balancing is retrieved by the ICM from the Message Service.

When a server process has sufficient resources to consume a request, it takes it out of the FCA queue, processes it, and writes it back into the queue so it is returned to the originator of the request.

The server processes of AS Java actually execute the Java application. They are responsible for processing incoming requests which are assigned to them by the ICM.

Each server process is multi-threaded, and can therefore process a large number of requests simultaneously.

When more than one server processes run inside a Java instance, all of them have the same capabilities.

During installation, the installation procedure configures the optimal number of server processes in an instance based on the available hardware resources. You can add more server processes to an existing Java instance.

Server processes in an instance have a shared memory which enables much faster interaction. In the shared memory, server processes and the ICM store all their monitoring information, which can be used for detailed analysis of the current internal status of each Java instance.

All VMs in the instance have access to a shared memory area used as a session store, which is also a safeguard against VM failures. This is enabled by the use of SAP’s own implementation of a Java Virtual Machine.

SAP Java Virtual Machine (SAP JVM)

AS Java uses SAP JVM as its runtime platform. The SAP JVM is based on the Hotspot Java VM provided by Sun Microsystems but it also possesses some additional features, such as:

  • Debugging on demand — SAP JVM makes it possible to switch a running system into debugging mode and vise versa without the need to restart the VM. This reduces the effort to track down a problem in real-life scenarios.
  • Memory analysis — easier detection of out-of-memory situations and analysis of memory footprint due to memory debugging features embedded into the VM.
  • Performance profiling — detection of performance bottlenecks due to runtime tracing capabilities embedded into the VM.
  • Robustness — due to fast session failover based on shared memory. The robustness concept is based on two main ideas: fewer active user requests per VM and a VM independent safe storage of inactive user sessions. More than one VM can run on each machine to reduce the amount of parallel processed user requests per VM, and inactive user sessions are separated from the VMs. More information: SAP JVM

Java Instance Homogeneity

The Java instance itself is homogeneous — all server processes running inside it have the same components deployed on each one of them. Moreover, they have the same:

  • configuration — all server processes use the same configuration template and share the instance custom settings
  • lifecycle — status of all components is the same. When one component is started/stopped on one server process, it is started/stopped on all server processes in the Java instance. Hence, to guarantee homogeneity, if one component fails to start on one server process, it is stopped on all server process.

Источник

Java instance in sap

A pure Java system provides a Java™ 2 Enterprise Edition (Java EE) 1.6 compliant-environment for developing and running Java EE programs. With this installation you can run Java EE applications but not ABAP programs.

The design of SAP NetWeaver Application Server is aimed at providing an exceptionally high level of robustness and supportability for the applications running on it. The architecture of SAP NetWeaver Application Server Java and basic terminology are explained below. For details, you should refer to the component-specific documentation.

Instances of SAP NetWeaver Application Server Java

An SAP NetWeaver Application Server Java system has various instances. An instance is an administrative unit containing various components of an SAP system. The components of an instance are parameterized in a shared instance profile. Each instance is identified by a system ID and an instance number.

A distinction is made between application server instances and system central services instances (SCS instances).

There can be any number of application server instances in an SAP NetWeaver Java. The instances process incoming user requests. A Java application server instance contains one Internet Communication Manager, one SAP start service, and any number of Java server processes.

As well as multiple application server instances, there is one special instance that contains the message server, the enqueue server, and a separate start service — The SCS instance (system central services instance). The SCS instance cannot process any dialog requests — it is used to manage locks, exchange messages, and balance workload in the SAP system.

Components of SAP NetWeaver Application Server Java

  • Java server processes
  • Startup framework
  • Internet Communication Manager
  • Enqueue Server
  • Message Server
  • SAP Start Service

The following figure shows the components of a Java-only system. For a better overview, series lines have not been used. Incoming requests are accepted by the Internet Communication Manager and distributed to the Java server processes. There is one database for each Java system.

More Information

Источник

Understanding the Java Instance ID issue

First of all, let’s understand how a Java ID is generated.

Each SAP system Java contains the so-called box number, which is composed by 3 values: + + . The Java ID is then generated from the box number. For sakes of demonstration, let S01 and S02 be two SAP systems as follows:

Information S01 S02
SID S01 S02
Instance Number JC01 JC02
Hostname System01 System02
Calculated Java ID ID184962 ID224865

The table above shows the information of each system and the ID they generated, which is stored at database level. Currently, each system should be working just fine.

If by any chance one decides to copy the database from S01 and restore it over S02 system (which by the way is not supported), what will happen is the following:

Information S01 S02
SID S01 S02
Instance Number JC01 JC02
Hostname System01 System02
Calculated Java ID ID184962 ID184962

The Java ID of S01 is now in the DB of system S02. Then, the box number of S02 no longer matches its Java ID, causing an inconsistency.

The same would happen if any of the parameters of the box numbers were changed in an unsupported way. Then, the ID would still be the same, but the box number and ID would no longer match.

Some tools, such as SWPM (during system copies) and SUM check if the Java ID is consistent with the box number. If it is not, the tools stop the procedure with an error. Currently, the only available solution to fix that is to perform a system copy of the system that is inconsistent. However, as already mentioned, SWPM checks the consistency of the IDs and it will fail. Therefore, to overcome this, one must:

  1. Start the system copy with SWPM;
  2. After the export of the Central Instance, edit file SOURCE.PROPERTIES located in the export directory;
  3. The source parameters must be adjusted to the ones that generated the current ID located in the Database. In this case, after the export, the following content will be present in SOURCE.PROPERTIES file:
    src.ci.sid=S02
    src.ci.instance.number=02
    src.ci.instance.name=JC02
    src.ci.host=System02
  4. However, as per the first table, the above information generates ID224865, which no longer exists in the DB. So, one must adapt it to:
    src.ci.sid=S01
    src.ci.instance.number=01
    src.ci.instance.name=JC01
    src.ci.host=System01
  5. After that, the installation of the target system can be started. During the target CI installation, Java Migration Toolkit will be executed to correctly adjust the IDs of the Java system. It will migrate the current one (ID184962), to the correct ID that matches the box number of the target system. This box number is composed by the values provided to SWPM during the target system installation.

The consistency check of the Java ID with the box number can be done by following the steps from SAP Note 1711300, see the entry from C5061069 Sep/20/2011. Even though this note is focused for DB2 for i, the consistency check procedure is independent of database.

In case of any issues, a Support Incident should be created under BC-INS-MIG component.

Источник

Оцените статью