solidDB Help : Samples : Linked Library Access Java/JDBC sample
  
Linked Library Access Java/JDBC sample
This sample Java application demonstrates how to use the solidDB Linked Library Access (LLA) server with the solidDB JDBC API. For more information about LLA, see Linked Library Access (LLA).
The files for the samples are located in the soliddb-installdir\samples\aclib_java directory.
Note To run this sample, the following conditions must be true:
Your solidDB license file must have the solidDB LLA component enabled.
You must install JDK 1.7 or later and set the PATH and CLASSPATH settings for the Java compiler.
For general information about running the samples, see Samples.
Note LLA was previously known as Accelerator.
The sample application (SJASample.java) is a solidDB Java application that shows how to use the solidDB LLA server with the solidDB JDBC API. The sample is written in Java and uses JDBC API calls to complete the following actions:
1 Start the LLA server by using the proprietary SSC API for Java class SolidServerControl method 'startServer'.
The listen name is specified in the solid.ini file. The sample uses 'dba' as the default catalog name, user name, and password.
2 Create a table in the database.
3 Create two user threads and register them with the server by calling the SolidServerControl API method 'registerThread'. The user threads insert a random amount of data inside the table.
4 Unregister the user threads by calling the SolidServerControl API 'unregisterThread' method. The main thread waits until the user threads exit and outputs the data that is in the table.
5 Drop the table.
6 Stop the LLA server by calling stopServer.
Running the sample
You can run the runme script (runme.bat in Windows), which both compiles and runs the application.
Go up to
Samples