[jboss-svn-commits] JBL Code SVN: r5618 - in labs/jbossesb/trunk/product: . config config/data config/data/hypersonic config/deploy core/common/tests docs/Install/database
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Aug 8 14:47:55 EDT 2006
Author: kurt.stam at jboss.com
Date: 2006-08-08 14:47:52 -0400 (Tue, 08 Aug 2006)
New Revision: 5618
Added:
labs/jbossesb/trunk/product/config/data/
labs/jbossesb/trunk/product/config/data/hypersonic/
labs/jbossesb/trunk/product/config/data/hypersonic/JBossESB.properties
labs/jbossesb/trunk/product/config/data/hypersonic/JBossESB.script
labs/jbossesb/trunk/product/config/deploy/JBossESB-hsqldb-ds.xml
labs/jbossesb/trunk/product/docs/Install/database/README_HSQLDB.TXT
labs/jbossesb/trunk/product/docs/Install/database/hsqldb.rc
Modified:
labs/jbossesb/trunk/product/
labs/jbossesb/trunk/product/config/build.xml
labs/jbossesb/trunk/product/core/common/tests/build.xml
Log:
adding hsqldb support http://jira.jboss.com/jira/browse/JBESB-100
Property changes on: labs/jbossesb/trunk/product
___________________________________________________________________
Name: svn:ignore
-
build
deployment.properties
+
build
deployment.properties
javadocs
Modified: labs/jbossesb/trunk/product/config/build.xml
===================================================================
--- labs/jbossesb/trunk/product/config/build.xml 2006-08-08 16:46:20 UTC (rev 5617)
+++ labs/jbossesb/trunk/product/config/build.xml 2006-08-08 18:47:52 UTC (rev 5618)
@@ -9,8 +9,23 @@
<property name="org.jboss.esb.deployment.lib" value="${basedir}/lib"/>
<property name="org.jboss.esb.deployment.conf" value="${basedir}/conf"/>
<property name="org.jboss.esb.deployment.deploy" value="${basedir}/deploy"/>
+ <property name="org.jboss.esb.deployment.data" value="${basedir}/data"/>
- <target name="configure.jboss">
+ <target name="init">
+ <condition property="hsql.set" value="true">
+ <equals arg1="${org.jboss.esb.db.driver.jar}" arg2="hsqldb.jar"/>
+ </condition>
+ <condition property="create.set" value="true">
+ <and>
+ <equals arg1="${org.jboss.esb.db.driver.jar}" arg2="hsqldb.jar"/>
+ <equals arg1="${org.jboss.esb.db.create.db}" arg2="create"/>
+ </and>
+ </condition>
+ <echo>hsql set=${hsql.set}</echo>
+ <echo>create set=${create.set}</echo>
+ </target>
+
+ <target name="configure.jboss" depends="init,datasource,hsql-datasource,create-hsqldb">
<!-- lib -->
<copy file="${org.jboss.esb.deployment.lib}/${org.jboss.esb.db.driver.jar}"
todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/lib"/>
@@ -27,16 +42,36 @@
<filter token="org.jboss.esb.config.objstore" value="${org.jboss.esb.config.objstore}" />
</filterset></copy>
<!-- deploy -->
- <copy file="${org.jboss.esb.deployment.deploy}/JBossESB-ds.xml"
- todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy">
- <filterset>
- <filter token="org.jboss.esb.db.url" value="${org.jboss.esb.db.url}" />
- <filter token="org.jboss.esb.db.driver" value="${org.jboss.esb.db.driver}" />
- <filter token="org.jboss.esb.db.user" value="${org.jboss.esb.db.user}" />
- <filter token="org.jboss.esb.db.password" value="${org.jboss.esb.db.password}" />
- </filterset></copy>
+
<copy file="${org.jboss.esb.deployment.deploy}/properties-service.xml"
todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy"/>
</target>
+ <target name="hsql-datasource" if="hsql.set">
+ <echo>Installing hsql datasource</echo>
+ <copy file="${org.jboss.esb.deployment.deploy}/JBossESB-hsqldb-ds.xml" overwrite="true"
+ tofile="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy/JBossESB-ds.xml"/>
+ </target>
+
+ <target name="datasource" unless="hsql.set">
+ <echo>Installing datasource</echo>
+ <copy file="${org.jboss.esb.deployment.deploy}/JBossESB-ds.xml" overwrite="true"
+ todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy">
+ <filterset>
+ <filter token="org.jboss.esb.db.url" value="${org.jboss.esb.db.url}" />
+ <filter token="org.jboss.esb.db.driver" value="${org.jboss.esb.db.driver}" />
+ <filter token="org.jboss.esb.db.user" value="${org.jboss.esb.db.user}" />
+ <filter token="org.jboss.esb.db.password" value="${org.jboss.esb.db.password}" />
+ </filterset></copy>
+ </target>
+
+ <target name="create-hsqldb" if="create.set">
+ <echo>Installing hsql JBossESB database</echo>
+ <copy file="${org.jboss.esb.deployment.data}/hypersonic/JBossESB.script"
+ todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/data/hypersonic/"/>
+ <copy file="${org.jboss.esb.deployment.data}/hypersonic/JBossESB.properties"
+ todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/data/hypersonic/"/>
+ </target>
+
+
</project>
Added: labs/jbossesb/trunk/product/config/data/hypersonic/JBossESB.properties
===================================================================
--- labs/jbossesb/trunk/product/config/data/hypersonic/JBossESB.properties 2006-08-08 16:46:20 UTC (rev 5617)
+++ labs/jbossesb/trunk/product/config/data/hypersonic/JBossESB.properties 2006-08-08 18:47:52 UTC (rev 5618)
@@ -0,0 +1,17 @@
+#HSQL Database Engine
+#Tue Aug 08 13:11:18 EDT 2006
+hsqldb.script_format=0
+runtime.gc_interval=0
+sql.enforce_strict_size=false
+hsqldb.cache_size_scale=8
+readonly=false
+hsqldb.nio_data_file=true
+hsqldb.cache_scale=14
+version=1.8.0
+hsqldb.default_table_type=memory
+hsqldb.cache_file_scale=1
+hsqldb.log_size=200
+modified=yes
+hsqldb.cache_version=1.7.0
+hsqldb.original_version=1.8.0
+hsqldb.compatible_version=1.8.0
Added: labs/jbossesb/trunk/product/config/data/hypersonic/JBossESB.script
===================================================================
--- labs/jbossesb/trunk/product/config/data/hypersonic/JBossESB.script 2006-08-08 16:46:20 UTC (rev 5617)
+++ labs/jbossesb/trunk/product/config/data/hypersonic/JBossESB.script 2006-08-08 18:47:52 UTC (rev 5618)
@@ -0,0 +1,4 @@
+CREATE SCHEMA PUBLIC AUTHORIZATION DBA
+CREATE USER SA PASSWORD ""
+GRANT DBA TO SA
+SET WRITE_DELAY 20
Added: labs/jbossesb/trunk/product/config/deploy/JBossESB-hsqldb-ds.xml
===================================================================
--- labs/jbossesb/trunk/product/config/deploy/JBossESB-hsqldb-ds.xml 2006-08-08 16:46:20 UTC (rev 5617)
+++ labs/jbossesb/trunk/product/config/deploy/JBossESB-hsqldb-ds.xml 2006-08-08 18:47:52 UTC (rev 5618)
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- The Hypersonic embedded database JCA connection factory config -->
+
+<!-- $Id: hsqldb-ds.xml,v 1.15.2.1 2006/01/10 18:11:03 dimitris Exp $ -->
+
+<datasources>
+ <local-tx-datasource>
+
+ <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
+ <!-- Datasources are not available outside the virtual machine -->
+ <jndi-name>JBossESBDS</jndi-name>
+
+ <!-- For server mode db, allowing other processes to use hsqldb over tcp. -->
+ This requires the org.jboss.jdbc.HypersonicDatabase mbean.
+ <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url>
+
+ <!-- For totally in-memory db, not saved when jboss stops.
+ The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
+ <connection-url>jdbc:hsqldb:.</connection-url>
+ -->
+ <!-- For in-process persistent db, saved when jboss stops.
+ The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
+
+ <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}JBossESBDB</connection-url>
+ -->
+
+ <!-- The driver class -->
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
+ <!-- The login and password -->
+ <user-name>sa</user-name>
+ <password></password>
+
+ <!--example of how to specify class that determines if exception means connection should be destroyed-->
+ <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
+
+ <!-- this will be run before a managed connection is removed from the pool for use by a client-->
+ <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
+
+ <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+ <min-pool-size>5</min-pool-size>
+
+ <!-- The maximum connections in a pool/sub-pool -->
+ <max-pool-size>20</max-pool-size>
+
+ <!-- The time before an unused connection is destroyed -->
+ <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
+ <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
+ <idle-timeout-minutes>0</idle-timeout-minutes>
+
+ <!-- sql to call when connection is created
+ <new-connection-sql>some arbitrary sql</new-connection-sql>
+ -->
+
+ <!-- sql to call on an existing pooled connection when it is obtained from pool
+ <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+ -->
+
+ <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
+ <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
+ -->
+
+ <!-- Whether to check all statements are closed when the connection is returned to the pool,
+ this is a debugging feature that should be turned off in production -->
+ <track-statements/>
+
+ <!-- Use the getConnection(user, pw) for logins
+ <application-managed-security/>
+ -->
+
+ <!-- Use the security domain defined in conf/login-config.xml -->
+ <security-domain>HsqlDbRealm</security-domain>
+
+ <!-- Use the security domain defined in conf/login-config.xml or the
+ getConnection(user, pw) for logins. The security domain takes precedence.
+ <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
+ -->
+
+ <!-- HSQL DB benefits from prepared statement caching -->
+ <prepared-statement-cache-size>32</prepared-statement-cache-size>
+
+ <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+ <metadata>
+ <type-mapping>Hypersonic SQL</type-mapping>
+ </metadata>
+
+ <!-- When using in-process (standalone) mode
+ <depends>jboss:service=Hypersonic,database=localDB</depends> -->
+ <!-- Uncomment when using hsqldb in server mode -->
+ <depends>jboss:service=Hypersonic</depends>
+
+ </local-tx-datasource>
+
+ <!-- Uncomment if you want hsqldb accessed over tcp (server mode)-->
+ <mbean code="org.jboss.jdbc.HypersonicDatabase"
+ name="jboss:service=Hypersonic">
+ <attribute name="Port">1701</attribute>
+ <attribute name="BindAddress">${jboss.bind.address}</attribute>
+ <attribute name="Silent">true</attribute>
+ <attribute name="Database">JBossESB</attribute>
+ <attribute name="Trace">false</attribute>
+ <attribute name="No_system_exit">true</attribute>
+ </mbean>
+
+
+ <!-- For hsqldb accessed from jboss only, in-process (standalone) mode
+ <mbean code="org.jboss.jdbc.HypersonicDatabase"
+ name="jboss:service=Hypersonic,database=localDB">
+ <attribute name="Database">localDB</attribute>
+ <attribute name="InProcessMode">true</attribute>
+ </mbean> -->
+
+</datasources>
Modified: labs/jbossesb/trunk/product/core/common/tests/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/build.xml 2006-08-08 16:46:20 UTC (rev 5617)
+++ labs/jbossesb/trunk/product/core/common/tests/build.xml 2006-08-08 18:47:52 UTC (rev 5618)
@@ -15,7 +15,7 @@
<!-- Set deployment properties filename -->
<property name="org.jboss.esb.deployment.properties" value="../../../config/deployment.properties"/>
- <!-- Load Build Properties File -->
+ <!-- Load deployment properties File -->
<property file="${org.jboss.esb.deployment.properties}"/>
<property name="org.jboss.esb.ejb3_conf.tests.src.dir" value="${org.jboss.esb.root.dir}/common/tests/resources/conf"/>
Added: labs/jbossesb/trunk/product/docs/Install/database/README_HSQLDB.TXT
===================================================================
--- labs/jbossesb/trunk/product/docs/Install/database/README_HSQLDB.TXT 2006-08-08 16:46:20 UTC (rev 5617)
+++ labs/jbossesb/trunk/product/docs/Install/database/README_HSQLDB.TXT 2006-08-08 18:47:52 UTC (rev 5618)
@@ -0,0 +1,51 @@
+#########################################################################
+# JBoss, Home of Professional Open Source
+# Copyright 2006, JBoss Inc., and individual contributors as indicated
+# by the @authors tag. See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+#########################################################################
+
+HOW TO INSTALL THE jbossesb database:
+
+1. Configure your deployment.properties to use hsqldb. Use username sa and
+a blank password. Then run
+
+ant configure.jboss
+
+This installs the database to jboss. It creates a datasource and the hsqldb
+data files JBossESB.properties and JBossESB.script in data/hypersonic.
+
+DONE
+
+2. Optionally you can add more tables by running scripts from the command
+line in the current directory
+
+java -cp ../../../config/lib/hsqldb.jar org.hsqldb.util.SqlTool --autoCommit --continueOnErr --rcfile hsqldb.rc JBossESBDB your.sql
+
+or you can connect with a db client tool with url=jdbc:hsqldb:hsql://localhost:1701,
+username=sa and a blank password.
+
+
+
+
+
+
+
+
+
+
Added: labs/jbossesb/trunk/product/docs/Install/database/hsqldb.rc
===================================================================
--- labs/jbossesb/trunk/product/docs/Install/database/hsqldb.rc 2006-08-08 16:46:20 UTC (rev 5617)
+++ labs/jbossesb/trunk/product/docs/Install/database/hsqldb.rc 2006-08-08 18:47:52 UTC (rev 5618)
@@ -0,0 +1,4 @@
+urlid JBossESBDB
+url jdbc:hsqldb:hsql://localhost:1701
+username sa
+password
More information about the jboss-svn-commits
mailing list