Powered By

Free XML Skins for Blogger

Powered by Blogger

Friday, January 16, 2009

SAP XI Runtime Environment Java Mappings

Use

The Integration Server (or the PCK) uses the runtime environment for Java mappings to execute Java mapping programs. In addition to the mapping API you can use other standard libraries of the SAP J2EE server in loaded Java mapping programs.

Prerequisites

You are using the Structure linkSAP NetWeaver Developer Studio.

To be able to write a mapping program in your Java development environment, the Java runtime environment (JRE) of the SAP J2EE server must be consistent with the JRE version of your Java development environment.

Features

The mapping runtime environment consists of the following runtime components:

The Java runtime environment (JRE) of the SAP J2EE server

The mapping API (see: Java Mapping)

sapxmltoolkit
The Structure linkSAP XML Toolkit for Java contains a JAXP implementation.

com.sap.mw.jco
The SAP Java Connector enables ABAP-APIs to be called from the Java mapping. See the corresponding Javadoc documentation in the SAP Developer Network at
https://www.sdn.sap.com/irj/sdn/javadocs (SDN user required).

com.sap.tc.Logging
The SAP Logging Service enables integration with the SAP Web AS Management tools. See the corresponding Javadoc documentation in the SAP Developer Network at
https://www.sdn.sap.com/irj/sdn/javadocs (SDN user required).

Java programs that are loaded in an imported archive can use classes from the JRE, the mapping API, and these three standard libraries.

Search Path for Classes in Java Mapping Programs (Integration Server)

The mapping runtime environment is determined by the software component version and the namespace of the Java mapping to be executed. The environment also has a specific search sequence when loading the classes. If the mapping runtime environment finds a class in a path, the search is terminated and the subsequent paths are ignored. The paths are searched in the following sequence:

...

1. The paths of the JRE of the J2EE server

2. The path in which the mapping API is saved and the path of the standard libraries (SAP XML Toolkit, SAP Java Connector, SAP Logging Service), see above

3. Imported archives in the same namespace and the same software component version as the Java mapping to be executed

4. Imported archives in the same namespace and a subordinate software component version

5. Imported archives in other namespaces of the software component version

6. Imported archives in other namespaces of subordinate software component versions

Note that you can only load a class from the other namespaces if it is unique there.

Caution

If you use JRE classes in your Java mapping programs then the same program restrictions apply as for Enterprise Java Beans (EJBs). This includes the following, for example (for a detailed description, see the relevant EJB specification):

Do not load a JDBC driver to use them directly. Instead, use the mapping lookup API (see: Mapping Lookups), or the JDBC Connector Service in the SAP J2EE Engine.

Do not use the package java.io to write directly to files, or use it to read directly from files.

Do not use a class loader in your classes.

Within a Java mapping program, do not call java.lang.System.exit() or java.lang.System.setProperties().

Do not create or use any threads.

Do not use any network sockets.

It is important that you also refer to the introductory notes and restrictions in Java Mapping.

.

Search Path for Classes in Java Mapping Programs (PCK)

The mapping runtime environment of the PCK does not recognize software component versions. Therefore, fewer paths are searched during class loading. If the mapping runtime environment finds a class in a path, the search is terminated and the subsequent paths are ignored. The paths are searched in the following sequence:

...

1. The paths of the JRE of the J2EE server

2. The path in which the mapping API is saved and the path of the standard libraries (SAP XML Toolkit, SAP Java Connector, SAP Logging Service), see above

3. Imported archives in the same namespace as the Java mapping to be executed

4. Imported archives in namespaces other than that of the Java mapping to be executed

Note that you can only load a class from the other namespaces if it is unique there.

Caution

You cannot use a class loader in the classes of an imported archive.

Activities

Accessing the Runtime Environment in the SAP NW Developer Studio

To access the mapping API, you must include the Jar file aii_map_api.jar in your class path. The Jar file is located in the following directory:

///j2ee/cluster/server/apps/sap.com/com.sap.xi.services/

To include the three J2EE standard libraries in the class path of the NetWeaver Developer Workplace, call the Set Additional Libraries... function in your Eclipse project by calling the context menu and selecting the libraries com.sap.tc.Logging, com.sap.mw.jco, and sapxmltoolkit.

No comments:

Archives