Mathematica 9 is now available
6.7 Mathematica Initialization

Documentation6. Advanced Topics

 

6.7 Mathematica Initialization

webMathematica uses a Java package that manages pools or groups of Mathematica kernels. It obtains a kernel from a pool, uses it, and returns it to the pool when finished. The kernel manager is responsible for launching and initializing, shutting down kernels at prescribed intervals as well as timing out computations that exceed a preset time constraint. After a kernel has been shut down, it will be restarted and reinitialized. This section will briefly describe the initialization process and how it can be specially configured.

Each Mathematica kernel is launched and initialized as follows:

The MSP application is loaded.

The ImageDirectory is set.

The MSPDirectory is added to $Path.

The time constraint parameter is set.

The SecurityConfiguration.m file is loaded (if present).

The security system is locked down.

The MSP.conf file can contain two optional lines for configuration. They appear below.

PackagesDirectory=/usr/local/myPackages
KernelInitialization=Get[ "MyInit.m"]

webMathematica adds the PackagesDirectory to the Mathematica $Path before any initialization is done, so it could be used to load the MSP application. The KernelInitialization setting is passed to the Mathematica kernel for evaluation as a last step of initialization. It can contain extra commands for loading special packages.



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT. CURRENT WEBMATHEMATICA DOCUMENTATION IS NOW AVAILABLE.