WSO2 SOA Enablement Server for Java™ comes with a preinstalled HSQL database. This Java-based database server, which includes a JDBC driver, is located in the archive WASP_HOME/lib/hsqldb.jar.
The preinstalled HSQL database is suitable for test purposes. To get better performance and scalability, you should use a standalone database server. Database servers supported by WSO2 SOA Enablement Server for Java™ are listed in Supported Platforms and Software.
If you want to switch to a different database you must include its JDBC driver in your CLASSPATH environment variable and then appropriately modify the WASP_HOME/conf/database.xml configuration file.
The preinstalled HSQL database is embedded, while other servers operate standalone with communication over TCP/IP. Database server usage configurations are stored in the file WASP_HOME/conf/database.xml. Example 2 shows the default configuration, which is only for HSQL.
![]() | Important |
---|---|
For the database to operate correctly, it is highly recommended that you use the latest JDBC driver provided by the database supplier. For Oracle, the JDBC driver for Oracle 10g is recommended even for previous database versions. |
![]() | Note |
---|---|
Sometimes it can be useful to specify a different directory to contain database.xml. For that purpose use -Dwasp.db.config.dir. This Java system property overrides the default location of WASP_HOME/conf. Its value must be in absolute form. |
Example 2. Database Server Usage Configuration
<?xml version="1.0" encoding="utf-8"?> <!-- HSQL configuration --> <config name="database"> <!-- configuration of database connection --> <database> <!-- type is a link to databaseMappings section --> <driverProperty> <type>hsql</type> <hostname>localhost</hostname> <port>9001</port> <dbName>WASP_HOME/store/hsqldb/db_persistence</dbName> <userName>PLEASE_SPECIFY</userName> <userPassword>PLEASE_SPECIFY</userPassword> </driverProperty> <!-- connectionPool configuration for main database --> <connectionPool> <defaultPoolSize>2</defaultPoolSize> <maxPoolSize>4</maxPoolSize> <poolCleaningInterval>10</poolCleaningInterval> <preparedStatementCacheSize>40</preparedStatementCacheSize> </connectionPool> </database> <!-- definition of database profiles and its specialities --> <databaseMappings name="databaseMappings"> <databaseMapping type="hsql"> <interfaceMapping className="com.systinet.uddi.database.hsql.Driver" interfaceName="com.systinet.uddi.database.Driver"/> <interfaceMapping className="com.systinet.uddi.database.DefaultQuoter" interfaceName="com.systinet.uddi.database.Quoter"/> <interfaceMapping className="com.systinet.uddi.database.hsql.Shutdown" interfaceName="com.systinet.uddi.database.Shutdown"/> <interfaceMapping className="com.systinet.persistence.hsql.HsqlSchemaHelper" interfaceName="com.systinet.persistence.DatabaseSchemaHelper"/> </databaseMapping> </databaseMappings> </config>