Using the Embedded Java API
In addition to SQL, NuoDB supports Java stored procedures, triggers, and user defined functions (UDF). The Java API supported by stored procedures, triggers, and user defined functions is referred to as the NuoDB embedded Java API and it is important to note differences between the NuoDB JDBC Driver API and the NuoDB embedded Java API. See Unsupported Methods in Embedded Java API for more information.
When the Transaction Engine (TE) invokes a Java stored procedure, trigger, or UDF, it will use the same JVM that was used to invoke the broker that started the TE.
However, if the TE has been invoked manually (that is, not via the broker), the method for finding the JVM is platform specific.
-
On Linux, the TE will look for the JVM pointed to by the
JAVA_HOME
environment variable. If theJAVA_HOME
environment variable is not set, it will look in well known locations, e.g./usr/lib/java/…
-
On Windows, the TE will look for the default JVM in the registry (
HKLM\SOFTWARE\JavaSoft\Java Runtime Environment
)