SMA and LLA Guide : Creating and running SMA applications with Java : Overview of using SMA with Java
  
Overview of using SMA with Java
A Java application that uses SMA is created in the same way as an application that uses a regular solidDB® server, with the exception that you start an SMA server instead of a regular solidDB® server. The Java application connects to the SMA server and uses the services solidDB® server provides through a standard JDBC API. Linking to the dynamic library allows the application to avoid the overhead of RPC (Remote Procedure Calls) through the network.
Java/JDBC programs that want to use SMA link to the SMA driver library (ssolidsmaxx). This library contains the entire solidDB® server, except that it is in the form of a callable library instead of a stand-alone executable program. The libraries used with Java/JDBC are the same as the ones used with C/C++ applications; there are no separate versions for Java.
When you use SMA with Java/JDBC, you link the following components into a single executable process:
SMA driver library
your Java-language client program
the JVM
The layers in the executable process are, from top to bottom:
Local Java (JDBC) client application
JVM (Java Virtual Machine)
SMA driver library
The Java commands in your client are executed by the JVM. If the command is a JDBC function call, the JVM calls the appropriate function in the SMA driver library. The function call is direct, it does not go through the network (through RPC). The calls are made using Java Native Interface (JNI). You do not need to write any JNI code yourself; you simply have to call the same JDBC functions that you would call if you were writing a remote client program.
Every application that uses SMA follows the same basic four-step pattern:
1 Configure the solidDB® server and connection settings.
2 Start the SMA server.
3 Access the database by using normal JDBC API.
4 When database processing is done, stop the SMA server.
See also
Creating and running SMA applications with Java