License     Codehaus     OpenEJB     OpenJMS     OpenORB     Tyrex     
 

Main
  Home
  About
  Features
  Download
  Maven 2 support
  API
  DTD & Schemas
  Recent changes
  RSS news feed

Development/Support
  Mailing Lists
  SVN/JIRA
  Contributing
  Support
  Prof. services

Related projects
  Spring ORM support
  Spring XML factories

XML
  Using XML
  XML Mapping
  XML FAQ
  XML HOW-TOs
  Custom Handlers
  Best practice

XML Code Generator
  Code Generator
  Properties
  Custom bindings
  Ant task
  Schema Support
  Example

JDO
  Introduction
  Using JDO
  JDO Config
  Types
  JDO Mapping
  JDO FAQ
  JDO Examples
  JDO HOW-TOs
  Other Features
  JDO sample JAR

Advanced JDO
  Caching
  OQL
  Trans. & Locks
  Design
  KeyGen
  Long Trans.
  Nested Attrs.
  Pooling Examples
  LOBs
  Best practice

More
  Presentations
  The Examples
  3rd Party Tools
  JDO Tests
  XML Tests
  Configuration
  Tips & Tricks
  Full JavaDoc
  CastorWiki
 
 

About
  License
  Contributors
  Marketplace
  Status, Todo
  Changelog
  Library
  Contact
  Project Name

  



Running the self-executable Castor JDO examples

Documentation Author(s):
Werner Guttmann


Download the castor-$RELEASE-examples.zip archive
Unpack the ZIP file
Running the Castor JDO samples
What happens
Hints


Download the castor-$RELEASE-examples.zip archive

In order to be able to run the new Castor JDO examples, please download the new castor-${RELEASE}-examples.zip from the download page and put it into some location on your computer.

Unpack the ZIP file

To unpack the ZIP file downloaded, please issue one of the following commands:

  unzip castor-1.0M3-examples.zip

or

  jar xvf castor-1.0M3-examples.zip

You can now run the examples using the directions provided in the next section.

Running the Castor JDO samples

In the directory where you have unpacked the ZIP file downloaded, you'll find a castor-1.0M3-examples.jar. In addition, a directory named 'lib' had been created, where you'll find several JAR files required to run the samples.

To execute he samples, please issue the following command:

  java -jar castor-1.0M3-examples.jar

... et voila ! You'll see various lines of logging output flashing by, whilst the Castor JDO samples are executing against a database.

What happens

The Castor JDO sample will test persistence between a set of Java classes (Product, ProductGroup, ProductDetail, etc.) and perform this code against an Apache Derby instance as RDBMS. For this purpose, the sample code will start an embedded Derby instance on the fly, create the required tables, and then continue to execute several code fragments using various Castor JDO artefacts (JDOManager, Database, etc.) against this embedded database.

In other words, everything is self-contained, and there is no need anymore to install a database, create a database schema and all the required tables. Everything required is initiated and setup from within the sample code.

Hints

-If it is not set yet, you might have to set the JAVA_HOME environment variable, and add the $JAVA_HOME/bin directory to your path.
 
   
  
   
 


Copyright © 1999-2005 ExoLab Group, Intalio Inc., and Contributors. All rights reserved.
 
Java, EJB, JDBC, JNDI, JTA, Sun, Sun Microsystems are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and in other countries. XML, XML Schema, XSLT and related standards are trademarks or registered trademarks of MIT, INRIA, Keio or others, and a product of the World Wide Web Consortium. All other product names mentioned herein are trademarks of their respective owners.