From: xzy12345 <xzy...@12...> - 2009-05-03 15:05:58
|
Hi,Thanks for your help.I test the application again using junit. The select and update statements is ok.But when writing,the console will print : 23:00:08,046 WARN sequoia.controller.cache Table t_head_sys not found in cache schema. Flushing whole cache. When I changed the configuration from <bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="org.continuent.sequoia.driver.Driver"> </property> <property name="url" value="jdbc:sequoia://localhost:25322/myDB"></property> <property name="username" value="user"></property> <property name="password" value="user"></property> </bean> to <bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver"> </property> <property name="url" value="jdbc:mysql://localhost:3306/coas"></property> <property name="username" value="root"></property> <property name="password" value="root"></property> </bean> It's right ok.So I think the problem lies in that the way I fetch the database schema from my database backends. myDB(admin) > show backend localhost1 +--------------------------+-------------------------------------+ | Backend Name | localhost1 | | Driver | org.gjt.mm.mysql.Driver | | URL | jdbc:mysql://192.168.1.10:3306/coas | | Active transactions | 0 | | Pending Requests | 0 | | Read Enabled | true | | Write Enabled | true | | Is Initialized | true | | Static Schema | false | | Connection Managers | 2 | | Total Active Connections | 25 | | Persistent Connections | 0 | | Total Requests | 2039 | | Total Transactions | 0 | | Last known checkpoint | <unknown> | +--------------------------+-------------------------------------+ I looked the sequoia.dtd file.But I don't know what should I change. My configuration is: <DatabaseBackend name="localhost1" driver="org.gjt.mm.mysql.Driver" url="jdbc:mysql://192.168.1.10:3306/coas" connectionTestStatement="select 1"> <ConnectionManager vLogin="user" rLogin="root" rPassword="root"> <VariablePoolConnectionManager initPoolSize="10" minPoolSize="5" maxPoolSize="50" idleTimeout="30" waitTimeout="10"/> </ConnectionManager> </DatabaseBackend> <DatabaseBackend name="localhost2" driver="org.gjt.mm.mysql.Driver" url="jdbc:mysql://192.168.1.25:3306/coas" connectionTestStatement="select 1"> <ConnectionManager vLogin="user" rLogin="root" rPassword="root"> <VariablePoolConnectionManager initPoolSize="10" minPoolSize="5" maxPoolSize="50" idleTimeout="30" waitTimeout="10"/> </ConnectionManager> </DatabaseBackend> Thanks for your help. |