AW: [Objectbridge-jdo-dev] Introduction
Brought to you by:
thma
From: Mahler T. <tho...@it...> - 2002-04-12 08:14:42
|
Hi Joel, <ozone deficits> ACK ! <snip db4o> <snip> > > Sounds good... What would be the quickest way for me to digest your > PersistenceBroker API? > There is a tutorial on the PB API: http://objectbridge.sourceforge.net/tutorial1.html JavaDoc is here: http://objectbridge.sourceforge.net/api/ojb/broker/package-summary.html To get an impression how a JDO implementation could use PB Api internally you might have a look at the OJB ODMG Implementation. Interesting points to get started: - ojb.odmg.TransactionImpl Each transactionImpl holds a PB to do perform persistence Operations. - ojb.odmg.oql.OQLQueryImpl the execute() method is most interesting. is shows how OQL Strings are parsed into OJB query objects. Than a PB is used to perform the query - ojb.odmg.states.ModificationState and subclasses this is a part that I really like. This is the ODMG instance lifecyle. it combines State Pattern and command pattern. StatePattern is used to model the state transition between the lifecycle states. (My ODMG impl follows closely the JDO spec. The only required JDO state not present is the "Hollow" state) command pattern is used to perform appropiate operations on commit and rollback. cu, Thomas |