11.07.2015 Views

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

webMathematica User Guide 291Determine the PoolThe first task is to determine which pool is to be used for the request. This is based on the fullname of the JSP using the URLPattern configuation setting.Allocate the KernelA Mathematica kernel is requested from the kernel pool. The pool maintains a collection ofMathematica kernels waiting for computations. If no kernel is available, the system waits untilone is ready. Using a pool allows the system to share Mathematica kernels across multiplerequests, which leads to a faster response time for the system.Note that each request may get a completely different kernel. You cannot rely on saving anythingin your Mathematica kernel and restoring it the next time.Assign Input VariablesAny input variables that were sent with the request are then passed to the Mathematica kernelwith their values. For a variable sym and value fun, a Mathematica assignment $$sym = "fun"is made. This ensures that the value is a Mathematica string, an inert object that will not evaluatewithout some special action. Note that input elements are not the only sources of variables.For example, an image map may cause transmission of variables. webMathematicarenames these input variables, and this helps to ensure that they do not interfere with yourMathematica code.Each variable is scanned to verify that it is a valid Mathematica symbol. Any "." character isreplaced by a backquote (`), and any underscore (_) is replaced with a "U". This mapping ofnames is consistent with the way that J/Link maps names.Here are some samples of renamed variables.Server Variableinputname.xvar_xMathematica Symbol$$inputname`$$x$$varUx

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!