Scott, I would like to put in something for the
database access.

I would like us to implement something like the
services in turbine. 

What I would like to add is an object,
opl.database.DbBrokerManager, and an interface,
opl.database.DbBroker.  DbBrokerManager holds the
various DbBrokers.  With DbBroker implemented as an
interface we can plug in any DbBroker we want; for
example, Turbine's.  Just write a class that
implements our DbBroker interface.  Users can extend
this by writing their own implementations of DbBroker.

This way, no reinventing wheels.  We don't care about
Oracle or whatever.  In a properties file, the user
associates the following for a database service: the
implementing class of SqlInterface, the class for the
dbBroker, and any parameters needed by the dbBroker. 
For example,

dbservicename.sqlInterface=org.apache.turbine.opl.sql.OracleInterface
dbservicename.dbBroker=org.apache.turbine.opl.database.TurbineBroker
dbservicename.login=blah
dbservicename.password=blahblah
..., blah, blah,

Turbine services could be used to initilize and add a
broker to the broker manager.

I really don't think we need the database map class. 
Just the "name" of the db service, and have this in
the class map.  Aren't we only going to generate one
sql for a given class map.  Yeah, we'll generate other
sqls for some associations, but each associated class
will have it's own map.  So, it should be 1 to 1 on
class map to generated sql.  Could you have more than
one database per sql?  Any other opinions from the
real world?

After adding this, a few lines of code to
PersistenceBroker, and test code with hard-coded
values for class map, we could exercise delete and
insert.  By adding a skeleton cursor, we also get the
select working.  And, then we have a working model;
albeit, without much functionality.  Only hassle is
hand-coding the class maps.  

What's your thoughts.

george



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to