commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmitch...@apache.org
Subject cvs commit: jakarta-commons-sandbox/resources/src/test init.sql SqlMapConfig.xml SqlMapConfig.properties
Date Tue, 07 Sep 2004 23:48:19 GMT
jmitchell    2004/09/07 16:48:19

  Added:       resources/src/test init.sql SqlMapConfig.xml
                        SqlMapConfig.properties
  Log:
  adding iBatis Impl
  
  Revision  Changes    Path
  1.1                  jakarta-commons-sandbox/resources/src/test/init.sql
  
  Index: init.sql
  ===================================================================
  -- Script to create an example database
  ------------------------------------
  
  DROP TABLE RESOURCES;
  
  create table resources ( 
    locale            varchar(10)      not null,
    msgKey            varchar(255)     not null,
    val               varchar(255),
    Primary Key(
      locale,
      msgKey
    )
  );
  
  Insert into resources (locale, msgKey, val) Values ('', 'test.base', '[Base] ONLY');
  Insert into resources (locale, msgKey, val) Values ('', 'test.specific', '[Base] SPECIFIC');
  Insert into resources (locale, msgKey, val) Values ('', 'test.inherit', '[Base] INHERIT');
  Insert into resources (locale, msgKey, val) Values ('', 'test.message', '[Base] REPLACE
{0} WITH {1}');
  
  Insert into resources (locale, msgKey, val) Values ('en', 'test.specific', '[en] SPECIFIC');
  Insert into resources (locale, msgKey, val) Values ('en', 'test.inherit', '[en] INHERIT');
  
  Insert into resources (locale, msgKey, val) Values ('en_US', 'test.specific', '[en_US] SPECIFIC');
  
  Insert into resources (locale, msgKey, val) Values ('fr', 'test.specific', '[fr] SPECIFIC');
  Insert into resources (locale, msgKey, val) Values ('fr', 'test.inherit', '[fr] INHERIT');
  
  
  
  
  1.1                  jakarta-commons-sandbox/resources/src/test/SqlMapConfig.xml
  
  Index: SqlMapConfig.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE sql-map-config
      PUBLIC "-//iBATIS.com//DTD SQL Map Config 1.0//EN"
      "http://www.ibatis.com/dtd/sql-map-config.dtd">
  
  <sql-map-config>
  
    <properties resource="SqlMapConfig.properties" />
  
    <settings cacheModelsEnabled="true"/> 
  
    <datasource name="simple"
                factory-class="com.ibatis.db.sqlmap.datasource.SimpleDataSourceFactory"
                default="true">
      <property name="JDBC.Driver" value="${driver}"/>
      <property name="JDBC.ConnectionURL" value="${url}"/>
      <property name="JDBC.Username" value="${username}"/>
      <property name="JDBC.Password" value="${password}"/>
      <property name="JDBC.DefaultAutoCommit" value="true" />
      <property name="Pool.MaximumActiveConnections" value="10"/>
      <property name="Pool.MaximumIdleConnections" value="5"/>
      <property name="Pool.MaximumCheckoutTime" value="120000"/>
      <property name="Pool.TimeToWait" value="500"/>
      <property name="Pool.PingQuery" value="select 1 from RESOURCES"/>
      <property name="Pool.PingEnabled" value="false"/>
      <property name="Pool.PingConnectionsOlderThan" value="1"/>
      <property name="Pool.PingConnectionsNotUsedFor" value="1"/>
      <property name="Pool.QuietMode" value="true"/>
    </datasource>
  
    <sql-map resource="org/apache/commons/resources/impl/MessageResources.xml" />
  
  </sql-map-config>
  
  
  
  1.1                  jakarta-commons-sandbox/resources/src/test/SqlMapConfig.properties
  
  Index: SqlMapConfig.properties
  ===================================================================
  driver=org.hsqldb.jdbcDriver
  url=jdbc:hsqldb:.
  username=sa
  password=
  
  
  

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


Mime
View raw message