Contents Index How do I store Java instructions in the database? Why Java?

ASA Programming Guide
  Introduction to Java in the Database
    Java in the database Q & A

How does Java get executed in a database?


Adaptive Server Anywhere includes a Java Virtual Machine (VM) which runs in the database environment. The Adaptive Server Anywhere Java VM interprets compiled Java instructions and runs them in the database server.

In addition to the VM, the SQL request processor in the database server has been extended so it can call into the VM to execute Java instructions. It can also process requests from the VM to enable data access from Java.

Differences from a standalone VM 

There is a difference between executing Java code using a standard VM such as the Sun Java VM java.exe and executing Java code in the database. The Sun VM runs from a command line, while the Adaptive Server Anywhere Java VM is available at all times to perform a Java operation whenever it is required as part of the execution of a SQL statement.

You cannot access the Java VM externally. It is only used when the execution of a SQL statement requires a Java operation to take place. The database server starts the VM automatically when needed: you do not have to take any explicit action to start or stop the VM.


Contents Index How do I store Java instructions in the database? Why Java?