james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M.P. Willems" <m.p.will...@chello.nl>
Subject Portability vs. db specific connections
Date Fri, 08 Jun 2001 16:16:44 GMT
I strongly agree with last proposal,

Going into specific db's would be a surrender towards non portability. From
my point of view a big NO. Let's handle those db specific create statements
in SQL script's and stay focused on programming a good inteface for the JDBC
connection. Just include SQL scripts for all possible tastes of db's with
the future releases of James, Notice that most of the major db's are
represented here, so those scripts will be of no concern. For those people
who want to deploy this mailserver with db connectivity, running a sql
script wil be of no problem in general.





----- Original Message -----
From: "Danny Angus" <danny@thought.co.uk>
To: <james-dev@jakarta.apache.org>
Sent: Friday, June 08, 2001 4:55 PM
Subject: RE: AW: Working on UsersJDBCRepository.


>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I think you should have the table creation statements in an xml file,
> and read them from this as directed by config.xml
>
> so for example...
>
> config.xml snippet might read:
>
>       <spoolRepository>
>         <repository
> destinationURL="jdbc:mysql://www.x.co.uk/mailusers?user=James&password
> =mailhost"
>                     type="USERS"
>                     model="SYNCHRONOUS">
> <driver>org.gjt.mm.mysql.Driver</driver>
> <tablename>mailusers</tablename>
> <SQL>
> <create>rdbms.Mysql.users.create</create>
> <queries>rdbms.Mysql.users.queries</queries>
> </SQL>
>         </repository>
>       </spoolRepository>
>
>
> Then... the SQL.XML would be..
>
> <James-JDBC-repository-SQL-Store>
> <rdbms>
> <Mysql>
> <users>
> <create>
>     CREATE TABLE [tablename] (
>    id INT NOT NULL AUTO_INCREMENT,
>     firstnamefield VARCHAR(60) NOT NULL,
>     lastnamefield VARCHAR(60) NOT NULL,
>     PRIMARY KEY (id)
> );
> </create>
> <queries>
> <insert>INSERT into [tablename] (firstnamefield, lastnamefield)
> values ('[firstname]','[lastname]')
> ...more-queries-here...
> </queries>
> </users>
> </Mysql>
> </rdbms>
> </James-JDBC-repository-SQL-Store>
>
> where.. [tablename],[firstname],[lastname] are replaced at runtime by
> james with appropriate values ..
> thus to add support for any other SQL RDBMS would only require a JDBC
> driver and some time hacking the SQL config file, no hacking the
> code.
>
>
>
>
> > -----Original Message-----
> > From: Christian Trutz [mailto:chris@smilebase.de]
>
> >
> > I think we need different UsersXXXrepository (XXX=MySQL,
> > M$SQLServer) because this different DBS habe different SQL
> > dialects:
>
> > so, if James should create tables, we need to save the above SQL
> > statements somewhere ... another idea is to save the above SQL
> > statements into configuration file or another idea is to assume the
> > tables are not created by James.
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBOyDnaUlGf1KbtpBnEQK1hgCg+ie7JaCaWS6PXYmPf0gSqyVG8WcAoKu2
> DMVM4KL+pwzZ4wKBKtsi5z0i
> =aL6N
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


Mime
View raw message