Skip to main content

EnsLib.JavaGateway.Service

class EnsLib.JavaGateway.Service extends EnsLib.Gateway.Service

A service responsible for starting, monitoring and stopping the Java Gateway Server in a production.

Property Inventory

Method Inventory

Parameters

parameter JAVADEBUG = -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=${JavaDebugPort},suspend=${JavaDebugSuspend},server=y;
Java debugging parameters, used if JavaDebug is True:
(see http://java.sun.com/j2se/1.3/docs/guide/jpda/conninv.html#Xrunjdwp)
  • -Xdebug : Enable debugging
  • -Xnoagent : Disables oldjdb support
  • -Djava.compiler=NONE : Disable JIT compiler
  • -Xrunjdwp : JDWP Options
    • transport=dt_socket, (Use TCP/IP)
    • address=8000, (Listen on port 8000)
    • suspend=y, (Suspend the Java process until the debugger connects)
    • server=y (Listen for incoming debugger connection)
parameter SETTINGS = %gatewayName:Basic,%stopNamedGatewayOnTeardown:Basic,Address:Basic,Port:Basic,HeartbeatInterval,HeartbeatFailureTimeout,HeartbeatFailureAction,HeartbeatFailureRetry,JavaHome,ClassPath,JVMArgs,Logfile,UsePassphrase,JavaDebug,JavaDebugPort,JavaDebugSuspend,-ArchiveIO;
Inherited description: List of properties can be set as settings in the configuration file format is a comma separated list of property names

Properties

property Address as %String [ InitialExpression = "127.0.0.1" ];
IP address or name of the machine where the JVM to be used by the Java Gateway Server is located.
Property methods: AddressDisplayToLogical(), AddressGet(), AddressIsValid(), AddressLogicalToDisplay(), AddressLogicalToOdbc(), AddressNormalize(), AddressSet()
property ClassPath as %String (MAXLEN = 32000);
CLASSPATH containing the files required to be passed as an argument when starting the JVM. The user should typically provide here the files containing the classes used via the Java Gateway. We assume that the user has properly quoted the classpath and supplied the correct separators for the platform in case of multiple files.
Note that additional classpath can be specified in business operations derived from EnsLib.JavaGateway.AbstractOperation. See property AdditionalPaths in that class.
Property methods: ClassPathDisplayToLogical(), ClassPathGet(), ClassPathIsValid(), ClassPathLogicalToDisplay(), ClassPathLogicalToOdbc(), ClassPathNormalize(), ClassPathSet()
deprecated property JDKVersion as %String (DISPLAYLIST = ",Java 1.7,Java 1.8", VALUELIST = ",JDK17,JDK18") [ InitialExpression = "JDK18" ];
DEPRECATED : We now check the version of the java executable before starting the gateway. There is no need fo the user to tell which version of the JARs to use anymore. 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.
Property methods: JDKVersionDisplayToLogical(), JDKVersionGet(), JDKVersionIsValid(), JDKVersionLogicalToDisplay(), JDKVersionLogicalToOdbc(), JDKVersionNormalize(), JDKVersionSet()
property JVMArgs as %String (MAXLEN = 32000);
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.
Property methods: JVMArgsDisplayToLogical(), JVMArgsGet(), JVMArgsIsValid(), JVMArgsLogicalToDisplay(), JVMArgsLogicalToOdbc(), JVMArgsNormalize(), JVMArgsSet()
property JavaDebug as %Boolean [ InitialExpression = "0" ];
If set to True, enables Java debugging via TCP, allowing a Java debugger (such as Eclipse or Jswat) to attach. The default is False.
The following arguments can be set: JavaDebug, JavaDebugSuspend and JAVADEBUG.
Property methods: JavaDebugDisplayToLogical(), JavaDebugGet(), JavaDebugIsValid(), JavaDebugLogicalToDisplay(), JavaDebugNormalize(), JavaDebugSet()
property JavaDebugPort as %String [ InitialExpression = "8000" ];
Specifies the port to listen on if JavaDebug is True. The default is 8000.
Property methods: JavaDebugPortDisplayToLogical(), JavaDebugPortGet(), JavaDebugPortIsValid(), JavaDebugPortLogicalToDisplay(), JavaDebugPortLogicalToOdbc(), JavaDebugPortNormalize(), JavaDebugPortSet()
property JavaDebugSuspend as %String (DISPLAYLIST = ",Yes,No", VALUELIST = ",y,n") [ InitialExpression = "n" ];
If JavaDebug is True, this setting indicates whether the JVM is suspended on start in order to wait for the debugger to attach. The default is No.
Property methods: JavaDebugSuspendDisplayToLogical(), JavaDebugSuspendGet(), JavaDebugSuspendIsValid(), JavaDebugSuspendLogicalToDisplay(), JavaDebugSuspendLogicalToOdbc(), JavaDebugSuspendNormalize(), JavaDebugSuspendSet()
property JavaHome as %String (MAXLEN = 1023);
Location of the JVM (similar to JAVA_HOME environment variable). It is used to find the target JVM and assemble the command to start the Java Gateway.
Note: If there is a default JVM on the machine that is usable without the need to specify its location, this setting may be left blank.
Property methods: JavaHomeDisplayToLogical(), JavaHomeGet(), JavaHomeIsValid(), JavaHomeLogicalToDisplay(), JavaHomeLogicalToOdbc(), JavaHomeNormalize(), JavaHomeSet()

Methods

deprecated classmethod ConnectGateway(pEndpoint As %String, ByRef pGateway As %Net.Remote.Gateway, pDebug As %Boolean = 0, pTimeout As %Numeric = 5, pAdditionalPaths As %String = "") as %Status
Connect to a running Java Gateway Server. This method is deprecated.
method GetObjectGateway() as %DynamicObject
classmethod JavaDebugParams(pDebugPort As %String, pDebugSuspend As %String) as %String
deprecated classmethod PingJavaGateway(pPort As %String, pServer As %String = "127.0.0.1") as %Status
"Ping" the Java Gateway server to check if it's alive. This method is deprecated.
method ServerGet() as %String
deprecated classmethod StartGateway(pJavaHome As %String, pClassPath As %String, pJVMArgs As %String, pPort As %String, pLogfile As %String = "", pJavaDebug As %Boolean = 0, ByRef pDevice As %String = "", pAddress As %String = "127.0.0.1", pJavaDebugPort As %String = "", pJavaDebugSuspend As %String = "", pUsePassphrase As %Boolean = 0) as %Status
Start up the Java Gateway Server. This method is deprecated.
deprecated classmethod StopGateway(pPort As %String, pServer As %String = "127.0.0.1", pTimeout As %Numeric = 5) as %Status
Shutdown the Gateway. This method is deprecated.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab