cayenne-petstore is a classic Petstore Java application implemented with Cayenne and Struts. By default application uses embedded Apache Derby database.
Note that by default Derby (db engine used by cayenne-petstore) will attempt to create a database in the JVM
java.io.tmpdir (whatever that is from the web container perspective; Tomcat puts the database in
$CATALINA_HOME/temp/). If you want a different location, unpack the war file and edit
derby.system.home to an absolute path.
If you want a different database alltogether, open "WEB-INF/cayenne.xml" file in CayenneModeler and do the needed changes (of course you can do them by hand as well).
Inspecting Source Code
Petstore is a valid Eclispe project, so simply import it in Eclipse.