ToC DocOverview CGDoc RelNotes FAQ Index PermutedIndex
Allegro CL version 11.0

net.jlinker variables


*file-type-comparator*

Variable, net.jlinker package

The value of this variable should be a function name or function object of the function used to compare file types.
On Unix, the initial value is #'equal. On MS Windows, the initial value is #'equalp.

The initial value depends on the Operating System.

This variable is typically defined in the file jl-config.cl. It is used when Java is started from Lisp. The definition may need to be modified to fit the configuration of a particular site and Java version. If Java is not started from Lisp, then this variable is ignored.

See jlinker.html for more information on the jLinker facility.


*jdispatch-interactive*

Variable, net.jlinker package

When this variable is t (the initial value) a continuable error is signaled when the dynamic dispatcher finds more than one method matches the Lisp arguments. The user can continue from the error by picking one from the list.

When this variable is nil, a simple-error is signaled.

See jlinker.html for more information on the jLinker facility.


*jlinker-connection*

Variable, net.jlinker package

This anchor variable defines all the parameters for one complete connection between Lisp and Java. It links together a Lisp server socket and a Java client socket, and several processes involved in the connection. All operations on the connection must take place inside a correct dynamic binding of this variable.

For a single Lisp-Java connection, the global binding of this variable is adequate.

If multiple connections from Java are active in one Lisp, all are running in processes with their own dynamic binding of this variable. Normally, user Lisp code is executed in a "JavaLinkServer(x.y)" process in response to a call from Java; if this code starts another process that will use the interface to Java, the binding of jlinker-connection must be added to the new process.

The same rule applies to Lisp code triggered by events received by the "NotifyLisp(x.y)" processes.

See jlinker.html for more information on the jLinker facility.


*jlinker-debug*

Variable, net.jlinker package

The value of this variable is the default value for the :debug keyword argument to jlinker-init. If Java is started from Lisp, then Java is started in a visible window (on Windows), and also emits many status messages while connecting.

If Java is not started from Lisp, then this variable has no effect.

See jlinker.html for more information on the jLinker facility.


*jlinker-default-connection-pool*

Variable, net.jlinker package

This variable specifies the default parameters for a jlinker connection pool.

The initial value is nil to specify no connection pool (for compatibility with earlier versions where connection pooling was not available).

A typical value is a list of the form

   (lisp-min lisp-max lisp-idle java-min java-max java-idle)

where

All values are positive integers, 0 or -1 (see below for the meanings of 0 and -1).

This list can be abbreviated by the following shorter forms:

;;  A single number n denotes the list 

   (h n 0 h n 0)

;; where h == (ceiling n 2)

;; A 2-element list (a b) denotes the list 

  (h a 0 k b 0)

;; where h == (ceiling a 2) and k = (ceiling b 2)

The effective connection pool parameters are determined by comparing this list with a corresponding list from the Java side.
The comparison is made using the following rules:

Each port from Lisp to Java represents a socket connection in Lisp and a thread in Java.

Each port from Java to Lisp represents a socket connection In Java and a thread (Lisp process) in Lisp.

Ports up to the minimum number are created during jlinker initialization (but after jlinker-init returns). Ports above the minumum number are created on demand. The idle times apply to ports above the minimum number; if one such port is idle for the specified time, it is closed and the associated thread ended.

See jlinker.html for more information on the jLinker facility.


*jlinker-deprecated-warnings*

Variable, net.jlinker package

If this variable is set to a non-nil value, then the compiler will signal warnings if deprecated operators are encountered (no warning is signaled when the car of the value is nil). The compiler also collects the operators of deprecated forms in a list and appends that onto the value of this variable. The initial value is nil.

See jlinker.html for general information on the jLinker facility.


*jlinker-error-p*

Variable, net.jlinker package

The purpose of this global variable is to provide a default for the error-p keyword argument to the jlinker functions jlinker-init and jlinker-end. That argument determines the behavior of those functions when errors are detected.

The behavior prior to version 3.2.4 was in all cases to return some value that indicated an error situation. When the error-p keyword argument to those functions is unspecified and the value of this variable is nil, the behavior in all cases to return some value that indicated an error situation.

The initial value of this variable is t.

When the error-p keyword argument is unspecified and the value of this variable is non-nil (or the value of the error-p keyword argument is specified non-nil in the function call), the functions signal an error of type jlinker-error.

See jlinker.html for more information on the jLinker facility.


*jlinker-init*

Variable, net.jlinker package

This variable specifies a default set of arguments to the jlinker-init function. The initial value in the jlinker module is (:start-java).

If jlinker-init is called without arguments, the value of this variable is used as the actual argument list passed to the initialization function.

If arguments are present, the argument list and the value of this variable are combined to create the actual argument list passed to the initialization function. Any explicitly mentioned options override the corresponding option in the value of *jlinker-init*.

See jlinker.html for general information on the jLinker facility.


*jlinker-java-home*

Variable, net.jlinker package

This variable specifies the location of needed Java files.

If the value is nil, we assume that the execution path, class path, and library path variables are set correctly and jlinker makes no modifications to them at all.

On MS WIndows, if the value is :find, then jlinker searches the Windows Registry for the current version of Java.

If the value is non-nil, it is assumed to be a path string. The empty string is equivalent to the string ".".

When a jlinker socket connection is initialized,

See jlinker.html for more information on the jLinker facility.


*jlinker-port-timeout*

Variable, net.jlinker package

This variable specifies how long jlinker will wait for a port to Java for a call. The initial value is -1 to denote the value of *jlinker-reply-timeout*.

If this timeout is exceeded, a jlinker-port-error is signaled. This error leaves the port and connection in a valid state.

See jlinker.html for more information on the jLinker facility.


*jlinker-reply-timeout*

Variable, net.jlinker package

This variable specifies how long jlinker will wait for a reply from a Lisp call to Java. The initial value is 30 seconds.

If an application calls Java methods that may take longer, this value must be increased. It is sufficient to bind this variable around the call to Java.

If this timeout is exceeded, a jlinker-timeout-error is signaled. This error leaves the port in an unspecified state. Without a connection pool the jlinker connection must be ended with jlinker-end. If a connection pool is in effect, the unusable port is closed and discarded. If the pool is running in dynamic mode, another port may be created if necessary.

See jlinker.html for more information on the jLinker facility.


*jlinker-request-timeout*

Variable, net.jlinker package

This variable specifies how long jlinker will wait for a call from Java. The initial value is nil to specify an indefinite wait.

If this timeout is exceeded, the port from Java to Lisp is closed and discarded. Without a connection pool the jlinker connection is ended automatically with jlinker-end. If a connection pool is in effect, the unusable port is closed and discarded. If the pool is running in dynamic mode, another port may be created if necessary.

See jlinker.html for more information on the jLinker facility.


*jlinker-retry-delay*

Variable, net.jlinker package

The number of seconds jLinker waits before retrying some key interactions with Java. The initial value is 5. If this number is adjusted upward, jLinker becomes more tolerant of delays in communication. If adjusted downward, jLinker will conclude sooner that a connection has been lost.

See jlinker.html for more information on the jLinker facility.


*jlinker-retry-number*

Variable, net.jlinker package

The number of times jLinker tries to complete some key interactions with Java. The initial value is 3. If this number is adjusted upward, jLinker becomes more tolerant of delays in communication. If adjusted downward, jLinker will conclude sooner that a connection has been lost.

See jlinker.html for more information on the jLinker facility.


*jlinker-run-java*

Variable, net.jlinker package

This variable specifies the function called when Jlinker starts a Java VM for a socket connection. The default value is an internal function that is adequate for most situations. If Java is not started from Lisp or if native mode is specified, then this variable is ignored.

The value of this variable must be the name of a function of five or more optional arguments -- (&optional debug lport lhost jport jhost &rest more). The result of the function should be to start the JVM with a command line such as

       java com.franz.jlinker.JLCommonSocket [-debug] [-lport lport]
            [-lhost lhost] [-jport jport] [-jhost jhost] [more]

where [-debug] should be present if the first argument is non-nil, and so on.

The initial value of this variable is the symbol net.jlinker::run-java.

See jlinker.html for more information on the jLinker facility.


*jlinker-set-accessible*

Variable, net.jlinker package

The value of this special variable determines the jLinker behavior when Java throws java.lang.IllegalAccessException during a method call.

See Calling Methods of Inner Classes in jlinker.html for a more detailed discussion of this behavior.

See jlinker.html for more information on the jLinker facility.


*jlinker-start-timeout*

Variable, net.jlinker package

This variable specifies the default value of the timeout argument to jlinker-init when the mode is :start-java. In the :start-java case, a small timeout value is appropriate since Java is expected to connect to Lisp almost immediately.

It may be appropriate to increase this value if a long delay is expected when Lisp starts another OS process. A smaller value will allow Lisp to respond sooner to a failure in starting the Java VM.

The initial value of this variable is 10 (meaning 10 seconds).

See jlinker.html for more information on the jLinker facility.


*jlinker-timestamp*

Variable, net.jlinker package

When the value of this variable is non-nil jlinker includes a timestamp in progress messages and some error messages. The initial value is nil.

If the non-nil value is a string it is assumed to be a date-time format string (see locale-format-time; if another non-nil value is specified, the format string "%T " is used.

See jlinker.html for more information on the jLinker facility.


*jlinker-unix-vector-p*

Variable, net.jlinker package

This variable is used only in Unix. It is ignored under Windows. When non-nil (the initial value) jLinker starts Java with a vector argument to run-shell-command. When nil, we use a string argument. The effect of the vector argument is to avoid Unix shell environment modifications before Java is called. For example, jLinker sets CLASSPATH before calling Java but the shell profile may set CLASSPATH to a different value.

See jlinker.html for more information on the jLinker facility.


*jlinker-verbose*

Variable, net.jlinker package

The value of this variable is the default value for the :verbose keyword argument to jlinker-init. When true Lisp emits many status messages while connecting.

See jlinker.html for more information on the jLinker facility.


*jlinker-version*

Variable, net.jlinker package

The value is a list of 3 integers describing the jLinker version.

See jlinker.html for more information on the jLinker facility.


*jni-ld-path-p*

Variable, net.jlinker package

This variable is used when the jlinker native implementation is initialized.

Some versions of the Java VM require that the environment variable LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on macOS) include the path(s) to the Java VM shared libraries, even though the Java VM shared library is loaded by Lisp. If the setting is required, it must be done before Lisp is started - using (setf getenv) (after Lisp has started) is not sufficient. If the setting is required, but not there, the Java VM exits the application unconditionally with the message

  Error occurred during initialization of VM
  Unable to load native library: libjvm.so: cannot open shared object file:

Thus, the setting of the environment variable is outside the control of the Lisp application. If the variable *jni-ld-path-p* is non-nil, we attempt to determine if LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on macOS) is set correctly, and if not, signal a continuable error.

The initial value of this variable is t in the linux86 port of ACL. The initial value of this variable is nil in all other ports.

If the value of the variable is a string, we look for a file with that name in all the directories mentioned in LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on macOS). If the value of the variable is some other non-nil value, we look for a file named "libjvm.so", "libjvm.dll", or "libjvm.dylib", as approriate for the current operating system.

See jlinker.html for general information on the jLinker facility.


*jni-library*

Variable, net.jlinker package

This variable must be set to an appropriate value if the native mode of Jlinker is used. It may be a relative or an absolute pathname string. A relative pathname is conbined with the value of *jlinker-java-home*. An absolute path is used verbatim.

The path must point to the Java VM shared library.

See jlinker.html for general information on the jLinker facility.


Copyright (c) 2023, Franz Inc. Lafayette, CA., USA. All rights reserved.

ToC DocOverview CGDoc RelNotes FAQ Index PermutedIndex
Allegro CL version 11.0