| Version Status : 0.0.2 second release Tested with Tapestry 5.2.x and 5.3.x |
Introduction
The Tynamo Tapestry-JDO module allows you to work with a JDO3 (http://www.oracle.com/technetwork/java/index-jsp-135919.html) backed persistence layer, similarly to the way you would work w/ a JPA or Hibernate based persistence layer. JDO's main appeal is in its extensive support for ORM into relational databases (e.g. MySQL) as well as non-relational data stores (e.g. MongoDB through Datanucleus MongoDB Support, Google AppEngine JDO API, etc)
Configuration
In order to have a working configuration, the following are required:
- A dependency on org.tynamo:tapestry-jdo
- A JDO implementation (we use datanucleus in our examples, but others such as Apache JDO should work as well). The implementations typically have some way of integrating the JDO Enhancement process into the build; although not absolutely necessary (e.g. you could probably do that manually after you run your build and before packaging your app), it would probably be a good idea
- A properly configured jdoconfig.xml or persistence.xml
Add dependency on Tapestry-JDO
Add your JDO implementation
Configure build to instrument your JDO classes:
Add your persistence store driver :
Setup your JDO configuration (jdoconfig.xml):
Contribute the PersistenceManagerFactory name to your AppModule:
Usage
Inject PersistenceManager into your pages:
Auto-Commit in your pages
Configure service transactional behavior
Use JDO object as page contex
Classes that use a simple primary key (e.g. Long, String, etc) can be used as an acitvation/passivation context directly
