Using ASPersistence with a Database
You can use the ASPersistence example with a database for the data store. The default database supported in the code is PostgreSQL. The class MySQLConnection is also provided to show you how easy it is to build on the current ASPersistence example to support a different database.
Procedure
- Ensure your database server is running.
- Create a database for use with the ASPersistence example.
- Modify your CLASSPATH to include the JDBC driver jar file for your database
-
Modify the file ASPersistence.java as follows:
- Modify the file ASPersister.java as follows:
- Rebuild Examples.jar.
- Invoke the ASPersistence and ASOperations examples as described in Starting ASPersistence, and ensure that your CLASSPATH has been set appropriately as described in Step 3.
Copyright © Cloud Software Group, Inc. All rights reserved.