Using the SAP Java Connector
This chapter describes how to add the required components to your production so that it can send requests to SAP.
Add the following business hosts to your production.
The business operation EnsLib.SAP.Operation.
Configure this business host as described in the later in this chapter.
One or more business hosts that send SAP request messages to EnsLib.SAP.Operation, as needed.
Use the message classes that you generated. Your business hosts should create instances of these classes, set properties as applicable, and send the messages to the instance of EnsLib.SAP.Operation.
Settings for EnsLib.JavaGateway.Service
Configure the settings for EnsLib.JavaGateway.Service so that it can find the Java Gateway. These settings are:
IP address or name of the machine where the JVM to be used by the Java Gateway Server is located.
Port number to which the Java Gateway connects. The default is 55555.
Number of seconds between each communication with the Java Gateway to check whether it is active. When enabled, the minimum value is 5 seconds and the maximum value is 3600 seconds (1 hour). The default is 10 seconds. A value of 0 disables this feature.
Number of seconds without responding to the heartbeat, to consider that the Java Gateway is in failure state. If this value is smaller than the HeartbeatInterval property, the gateway is in failure state every time the Java Gateway communication check fails. The maximum value is 86400 seconds (1 day). The default is 30 seconds.
Action to take if the Java Gateway goes into a failure state. Setting it to Restart (default) causes the Java Gateway to restart. Setting it to Alert generates an alert entry in the Event Log. This is independent of the Alert on Error setting.
Time to wait before retrying the HeartbeatFailureAction if the Java Gateway server goes into failure state, and stays in failure state. The default is 300 seconds (5 minutes). A value of 0 disables this feature, meaning that once there is a failure that cannot be immediately recovered, there are no attempts at automatic recovery.
Location of the JVM (This is the value that you would use for JAVA_HOME environment variable). It is used to find the target JVM and assemble the command to start the Gateway.
If there is a default JVM on the machine that is usable without the need to specify its location, you can leave this setting blank.
Class path containing the files to be passed as an argument when starting the JVM. You must include any jar file that define classes you are importing via the Java Gateway. There is no need to include InterSystems' .jar files used by the Java Gateway. If you are specifying file paths containing spaces or multiple files, you should quote the classpath and supply the appropriate separators for your platform.
The following is an example semicolon-separated list of file paths for a Microsoft Windows platform:
Note that additional paths for the classpath can be specified in business operations derived from EnsLib.JavaGateway.AbstractOperation. See the property AdditionalPaths in that class.
Optional arguments to be passed to the Java Virtual Machine (JVM) to include when assembling the command to start the Java Gateway. For example, you can specify system properties: Dsystemvar=value or set the maximum heap size: Xmx256m and so on, as needed.
Version of JDK used to select the intended version of the InterSystems .jar files. It is used to assemble the command to start the Java Gateway. For example: Java 1.7
Fully qualified name of a file to log all communication between the InterSystems IRIS server and the Java Gateway. Usually this setting should be left blank, except when troubleshooting. These messages include acknowledgment of opening and closing connections to the server, as well as any difficulties encountered in mapping Java classes to InterSystems IRIS proxy classes.
Allow a Java debugger (such as Eclipse or JSwat) to attach. If True, enables Java debugging. The default is False.
Specify the port on which to listen. The default is 8000.
If Yes, suspend the JVM on start to wait for the debugger to attach. The default is No.
Settings for EnsLib.SAP.Operation
EnsLib.SAP.Operation sends requests to SAP JCo, via the Java Gateway. For this business host, specify the following settings:
SAP Client e.g 000.
This is the name of the set of production credentials to use when accessing the SAP server.
Host name or IP address of the SAP server.
SAP SystemNumber e.g 00.
Specifies whether to execute the BAPI "BAPI_TRANSACTION_COMMIT" after a successful BAPI/RFC-call.
Configuration item in this production that should receive the SAP response.
Name of the (required) configuration item that hosts the Java Gateway.
For settings not listed in this book, see “Settings in All Productions” in Managing Productions.