The current arrangement should allow easy specification of more than one db.
The current arrangement is as follows:
1. You specify the DatabaseMapBuilder (DMB) in TurbineResources.properties.
2. The DMB build() method will set up the maps for all the db's specified
in the build() method.
This has not been tested with several db's, but was written with this in
mind. First, the reason DMB was not specified as an interface. There are
several methods in the default DMB to get the names of critical columns
needed by Turbine. This allows one to use a naming convention that is
standard in your organization or with the rest of an application and have
one place where these modifications are noted. If you use the schemas as
supplied with Turbine, it is easiest to extend the default DMB, so that you
do not need all these little methods in your app specific DMB. So it is
assumed the normal use of the default DMB is as a parent to the app specific
DMB, then you only have to write the build() method.
You are welcome to write a DMB that generates the maps from metadata or an
XML spec or any other better way. If it is db neutral, it can replace the
current default, otherwise, everything is already in place to make
specifying your db schema(s) a reasonably simple matter, that requires no
compiling of the Turbine classes.
John McNally
----- Original Message -----
From: Andrew Mason <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Friday, February 11, 2000 2:25 AM
Subject: DatabaseMapBuilder
> How about a new DatabaseMapBuilder that enables you to connect db's to
> Turbine more easily?
> If my understanding is correct, currently you have one database map
builder
> class that you extend/customise to generate all your database maps.
> If you want to remove or change a database you have to alter this class.
>
> Would it not be a better idea to create individual mapbuilders for each
> database you wish to link to Turbine, these could be specified in the
> TurbineResouces.properties file. A 'manager' class could then generate the
> dbmaps using these mapbuilders.
>
> This enables Turbine Applications to be written as a discrete package that
> can be added to an existing installation of Turbine, without any need for
> recompilation of a mapbuilder class.
>
> I think it is easier to specify databases this way, rather than hardcoding
> it.
>
> If you think this is a good idea, I'll send you the code.
> If not, have I missed the point somewhere?
>
> Andrew
>
>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]