Discussion:
[Wsf-general] Data service - Connection
Diluka Moratuwage
2007-02-28 07:14:22 UTC
Permalink
Hi all,

This is regarding the connection part of the configuration file.

For connecting to a "mysql" database, the following information
is needed.

-host
-username
-password
-database
-port
-socket

So i would suggest if we come up with the connection part of the
config file something like this,

<connection dbtype="mysql|derby|sqlserver">
<property name="host"></property>
..............
..............
</connection>

The dbtype attribute specifies which type of a database system to
use.
And then the properties relevent for that particular database is specified.

So we have to comeup with all the valid property names for the
configuration file, depending on the type of database system used.
And as an initial stage i think we should support mysql for axis2/c and
for axis2 its derby.

Any suggestions please...

Thanks,
Diluka.
James Clark
2007-02-28 08:44:37 UTC
Permalink
Post by Diluka Moratuwage
<connection dbtype="mysql|derby|sqlserver">
Not a good approach. The relevant properties can potentially depend on
things other than the type of database. For example, a property that
specifies the JDBC driver is relevant iff you're using JDBC. A
particular database may be accessed in multiple ways: MySQL could be
accessed natively, via ODBC or via JDBC. It should be possible to use
JDBC generically without knowing which database you are connecting to.

I suggest instead that property names that are not generic should be
qualified to indicate their applicability, e.g. "jdbc.driver" for the
JDBC driver, "user" for the username (because that's generic), or
"mysql.option-group-suffix" to specify the MySQL option group suffix.
Post by Diluka Moratuwage
And as an initial stage i think we should support mysql for axis2/c and
for axis2 its derby.
That's probably a good starting point. But in doing the design, we need
to think beyond the initial stage and consider what we ultimately want
to support. For Axis2/C, that's probably

- MySQL
- PostgreSQL
- sqlite
- generic access via ODBC

For Java, I would hope we would be able to work with anything with a
JDBC driver.

James

Loading...