[jdev] sm.xml configure

Tomasz Sterna tomek at xiaoka.com
Tue Jun 26 07:32:01 CDT 2007

Dnia 26-06-2007, wto o godzinie 13:12 +0200, Norman Rasmussen
>  - in storage.c : copy mysql as mysql1 in: init extern's,
> driver_array, driver_inits
>  - in storage_mysql.c : copy mysql_init as mysql1_init, and change
> storage.mysql to storage.mysql1. 

Since 2.1.5 storage modules are loaded dynamically, so there is no
static module mapping table anymore.
All modules have st_init() function not specific to a module kind.
So copying storage_mysql.so as storage_mysql2.so and configuring
<mysql2/> would be enough, but the problem is in the storage_mysql.c

$ grep storage.mysql storage/storage_mysql.c
host = config_get_one(drv->st->sm->config, "storage.mysql.host", 0);
port = config_get_one(drv->st->sm->config, "storage.mysql.port", 0);
dbname = config_get_one(drv->st->sm->config, "storage.mysql.dbname", 0);
user = config_get_one(drv->st->sm->config, "storage.mysql.user", 0);

These are hardcoded to "storage.mysql.*" and would require code changes.

Tomasz Sterna
Xiaoka Grp.  http://www.xiaoka.com/

More information about the JDev mailing list