jdo-tutorial
Simple demonstration of using JDO with DataNucleus. You can run this with any supported datastore by simply editing the following files :-
- src/main/resources/META-INF/persistence.xml [Edit the datastore details here]
- pom.xml [Edit the dependency jars for your datastore]
Maven Instructions
-
Run the command mvn clean compile. This builds everything and enhances the classes.
-
Run the command mvn datanucleus:schema-create. This creates the schema for the tutorial.
-
Run the command mvn exec:java. This runs the tutorial.
-
Run the command mvn datanucleus:schema-delete. This deletes the schema for the tutorial
Ant instructions
-
Create a directory lib and add the following jars to it : jdo-api.jar, datanucleus-core.jar, datanucleus-api.jdo.jar, datanucleus-{store}.jar, log4j.jar, {your-database-driver}.jar
-
Run the command ant clean compile enhance. This builds everything and enhances the classes
-
Run the command ant createschema. This creates the schema for the tutorial.
-
Run the command ant runtutorial. This runs the tutorial.
-
Run the command ant deleteschema. This deletes the schema for the tutorial.