Author: jeff.yuchang
Date: 2009-06-24 03:01:49 -0400 (Wed, 24 Jun 2009)
New Revision: 625
Added:
idm/trunk/assembly/src/main/config/hsqldburl.hibernate.cfg.xml
idm/trunk/assembly/src/main/files/db/hibernate.cfg/hsqldburl.hibernate.cfg.xml
idm/trunk/assembly/src/main/files/db/jdbc/hsqldburl.properties
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-hsqldburl-jboss-beans.xml
idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-hsqldburl-ds.xml
Modified:
idm/trunk/assembly/scripts/antrun-schema.xml
idm/trunk/assembly/src/main/build.properties
idm/trunk/assembly/src/main/files/db/jdbc/hsqldb.properties
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-hsqldb-jboss-beans.xml
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-mssql-jboss-beans.xml
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-mysql-jboss-beans.xml
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-oracle-jboss-beans.xml
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-postgresql-jboss-beans.xml
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-sybase-jboss-beans.xml
idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-hsqldb-ds.xml
Log:
* Added another one, hsqldb url, which uses the hsql mem db.
* Update the db-jboss-beans.xml
Modified: idm/trunk/assembly/scripts/antrun-schema.xml
===================================================================
--- idm/trunk/assembly/scripts/antrun-schema.xml 2009-06-23 09:33:03 UTC (rev 624)
+++ idm/trunk/assembly/scripts/antrun-schema.xml 2009-06-24 07:01:49 UTC (rev 625)
@@ -31,6 +31,8 @@
<mkdir dir="${db.scripts.dir}" />
<!-- HsqlDB -->
+ <create-ddl db="hsqldburl"/>
+
<create-ddl db="hsqldb"/>
<!-- MySQL -->
Modified: idm/trunk/assembly/src/main/build.properties
===================================================================
--- idm/trunk/assembly/src/main/build.properties 2009-06-23 09:33:03 UTC (rev 624)
+++ idm/trunk/assembly/src/main/build.properties 2009-06-24 07:01:49 UTC (rev 625)
@@ -1,5 +1,5 @@
jbossidm.home=..
-database=hsqldb
+database=hsqldburl
jbossidm.version=1.0.0-SANPSHOT
jboss.home=/local/deploy/jboss-5.0.1.GA
jboss.server.configuration=default
\ No newline at end of file
Added: idm/trunk/assembly/src/main/config/hsqldburl.hibernate.cfg.xml
===================================================================
--- idm/trunk/assembly/src/main/config/hsqldburl.hibernate.cfg.xml
(rev 0)
+++ idm/trunk/assembly/src/main/config/hsqldburl.hibernate.cfg.xml 2009-06-24 07:01:49 UTC
(rev 625)
@@ -0,0 +1,53 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+ <session-factory>
+
+ <property
name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property name="hibernate.format_sql">true</property>
+
+
+ <!-- Mapping classes -->
+ <!-- all nessesary mappings are added programatically to the configuration in
the store-->
+ <!-- this is for manual SF creation-->
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateRealm"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttributeValue"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"/>
+
+
+ </session-factory>
+</hibernate-configuration>
Added: idm/trunk/assembly/src/main/files/db/hibernate.cfg/hsqldburl.hibernate.cfg.xml
===================================================================
--- idm/trunk/assembly/src/main/files/db/hibernate.cfg/hsqldburl.hibernate.cfg.xml
(rev 0)
+++
idm/trunk/assembly/src/main/files/db/hibernate.cfg/hsqldburl.hibernate.cfg.xml 2009-06-24
07:01:49 UTC (rev 625)
@@ -0,0 +1,63 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="show_sql">false</property>
+ <property
name="cache.use_second_level_cache">true</property>
+ <property name="cache.use_query_cache">false</property>
+
+ <property
name="current_session_context_class">thread</property>
+ <!-- ask hibernate to do the schema population -->
+ <!-- property
name="hibernate.hbm2ddl.auto">create-drop</property-->
+
+ <property
name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property
name="hibernate.connection.driver_class">@jdbc.driver(a)</property>
+ <property
name="hibernate.connection.url">@jdbc.url(a)</property>
+ <property
name="hibernate.connection.username">@jdbc.username(a)</property>
+ <property
name="hibernate.connection.password">@jdbc.password(a)</property>
+
+ <!-- Mapping classes -->
+ <!-- all nessesary mappings are added programatically to the configuration in
the store-->
+ <!-- this is for manual SF creation-->
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateRealm"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttributeValue"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"/>
+
+
+ </session-factory>
+</hibernate-configuration>
Modified: idm/trunk/assembly/src/main/files/db/jdbc/hsqldb.properties
===================================================================
--- idm/trunk/assembly/src/main/files/db/jdbc/hsqldb.properties 2009-06-23 09:33:03 UTC
(rev 624)
+++ idm/trunk/assembly/src/main/files/db/jdbc/hsqldb.properties 2009-06-24 07:01:49 UTC
(rev 625)
@@ -1,4 +1,4 @@
jdbc.driver=org.hsqldb.jdbcDriver
-jdbc.url=jdbc:hsqldb:mem:.
+jdbc.url=jdbc:hsqldb:hsql://localhost:1701
jdbc.username=sa
jdbc.password=
Added: idm/trunk/assembly/src/main/files/db/jdbc/hsqldburl.properties
===================================================================
--- idm/trunk/assembly/src/main/files/db/jdbc/hsqldburl.properties
(rev 0)
+++ idm/trunk/assembly/src/main/files/db/jdbc/hsqldburl.properties 2009-06-24 07:01:49 UTC
(rev 625)
@@ -0,0 +1,4 @@
+jdbc.driver=org.hsqldb.jdbcDriver
+jdbc.url=jdbc:hsqldb:mem:.
+jdbc.username=sa
+jdbc.password=
Modified:
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-hsqldb-jboss-beans.xml
===================================================================
---
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-hsqldb-jboss-beans.xml 2009-06-23
09:33:03 UTC (rev 624)
+++
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-hsqldb-jboss-beans.xml 2009-06-24
07:01:49 UTC (rev 625)
@@ -9,7 +9,6 @@
class="org.jboss.identity.idm.integration.jboss5.IDMService">
<constructor>
<parameter>jboss.idm.cfg.xml</parameter>
- <parameter><inject bean="JMXKernel"
property="mbeanServer"/></parameter>
</constructor>
<property
name="idmSessionFactoryJNDI">java:/IdentitySessionFactory</property>
<property
name="SQLScript">idm-sql/jboss.idm.hsqldb.create.sql</property>
Added:
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-hsqldburl-jboss-beans.xml
===================================================================
---
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-hsqldburl-jboss-beans.xml
(rev 0)
+++
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-hsqldburl-jboss-beans.xml 2009-06-24
07:01:49 UTC (rev 625)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!--
+ IDM Service
+ -->
+ <bean name="jboss.identity.IDMService"
+ class="org.jboss.identity.idm.integration.jboss5.IDMService">
+ <constructor>
+ <parameter>jboss.idm.cfg.xml</parameter>
+ </constructor>
+ <property
name="idmSessionFactoryJNDI">java:/IdentitySessionFactory</property>
+ <property
name="SQLScript">idm-sql/jboss.idm.hsqldburl.create.sql</property>
+ <property name="datasource">java:jbossidmDS</property>
+ <property name="exitSQL">select * from jbid_io</property>
+ <depends>jboss.jca:service=DataSourceBinding,name=jbossidmDS</depends>
+ </bean>
+
+</deployment>
\ No newline at end of file
Modified:
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-mssql-jboss-beans.xml
===================================================================
---
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-mssql-jboss-beans.xml 2009-06-23
09:33:03 UTC (rev 624)
+++
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-mssql-jboss-beans.xml 2009-06-24
07:01:49 UTC (rev 625)
@@ -9,7 +9,6 @@
class="org.jboss.identity.idm.integration.jboss5.IDMService">
<constructor>
<parameter>jboss.idm.cfg.xml</parameter>
- <parameter><inject bean="JMXKernel"
property="mbeanServer"/></parameter>
</constructor>
<property
name="idmSessionFactoryJNDI">java:/IdentitySessionFactory</property>
<property
name="SQLScript">idm-sql/jboss.idm.mssql.create.sql</property>
Modified:
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-mysql-jboss-beans.xml
===================================================================
---
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-mysql-jboss-beans.xml 2009-06-23
09:33:03 UTC (rev 624)
+++
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-mysql-jboss-beans.xml 2009-06-24
07:01:49 UTC (rev 625)
@@ -9,7 +9,6 @@
class="org.jboss.identity.idm.integration.jboss5.IDMService">
<constructor>
<parameter>jboss.idm.cfg.xml</parameter>
- <parameter><inject bean="JMXKernel"
property="mbeanServer"/></parameter>
</constructor>
<property
name="idmSessionFactoryJNDI">java:/IdentitySessionFactory</property>
<property
name="SQLScript">idm-sql/jboss.idm.mysql.create.sql</property>
Modified:
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-oracle-jboss-beans.xml
===================================================================
---
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-oracle-jboss-beans.xml 2009-06-23
09:33:03 UTC (rev 624)
+++
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-oracle-jboss-beans.xml 2009-06-24
07:01:49 UTC (rev 625)
@@ -9,7 +9,6 @@
class="org.jboss.identity.idm.integration.jboss5.IDMService">
<constructor>
<parameter>jboss.idm.cfg.xml</parameter>
- <parameter><inject bean="JMXKernel"
property="mbeanServer"/></parameter>
</constructor>
<property
name="idmSessionFactoryJNDI">java:/IdentitySessionFactory</property>
<property
name="SQLScript">idm-sql/jboss.idm.oracle.create.sql</property>
Modified:
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-postgresql-jboss-beans.xml
===================================================================
---
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-postgresql-jboss-beans.xml 2009-06-23
09:33:03 UTC (rev 624)
+++
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-postgresql-jboss-beans.xml 2009-06-24
07:01:49 UTC (rev 625)
@@ -9,7 +9,6 @@
class="org.jboss.identity.idm.integration.jboss5.IDMService">
<constructor>
<parameter>jboss.idm.cfg.xml</parameter>
- <parameter><inject bean="JMXKernel"
property="mbeanServer"/></parameter>
</constructor>
<property
name="idmSessionFactoryJNDI">java:/IdentitySessionFactory</property>
<property
name="SQLScript">idm-sql/jboss.idm.postgresql.create.sql</property>
Modified:
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-sybase-jboss-beans.xml
===================================================================
---
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-sybase-jboss-beans.xml 2009-06-23
09:33:03 UTC (rev 624)
+++
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-sybase-jboss-beans.xml 2009-06-24
07:01:49 UTC (rev 625)
@@ -9,7 +9,6 @@
class="org.jboss.identity.idm.integration.jboss5.IDMService">
<constructor>
<parameter>jboss.idm.cfg.xml</parameter>
- <parameter><inject bean="JMXKernel"
property="mbeanServer"/></parameter>
</constructor>
<property
name="idmSessionFactoryJNDI">java:/IdentitySessionFactory</property>
<property
name="SQLScript">idm-sql/jboss.idm.sybase.create.sql</property>
Modified: idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-hsqldb-ds.xml
===================================================================
--- idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-hsqldb-ds.xml 2009-06-23
09:33:03 UTC (rev 624)
+++ idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-hsqldb-ds.xml 2009-06-24
07:01:49 UTC (rev 625)
@@ -4,7 +4,7 @@
<local-tx-datasource>
<jndi-name>jbossidmDS</jndi-name>
-
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}jbossidm</connection-url>
+ <connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
@@ -31,7 +31,7 @@
<mbean code="org.jboss.jdbc.HypersonicDatabase"
name="jboss:service=Hypersonic,database=jbossidm">
<attribute name="Database">jbossidm</attribute>
- <attribute name="InProcessMode">true</attribute>
+ <attribute name="InProcessMode">false</attribute>
</mbean>
</datasources>
Added: idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-hsqldburl-ds.xml
===================================================================
--- idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-hsqldburl-ds.xml
(rev 0)
+++ idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-hsqldburl-ds.xml 2009-06-24
07:01:49 UTC (rev 625)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<datasources>
+
+ <local-tx-datasource>
+ <jndi-name>jbossidmDS</jndi-name>
+
+
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}jbossidm</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
+
+ <!-- connection pool parameters -->
+ <min-pool-size>1</min-pool-size>
+ <max-pool-size>5</max-pool-size>
+
+ <!-- disable idle connection removal, hsqldb does not reap threads on closed
connections -->
+ <idle-timeout-minutes>0</idle-timeout-minutes>
+ <!-- check all statements are closed when the connection is returned to the pool
-->
+ <track-statements />
+ <!-- hsqldb benefits from prepared statement caching -->
+ <prepared-statement-cache-size>32</prepared-statement-cache-size>
+
+ <!-- corresponding type-mapping in conf/standardjbosscmp-jdbc.xml -->
+ <metadata>
+ <type-mapping>Hypersonic SQL</type-mapping>
+ </metadata>
+
+ <!-- ensure the datasource is not initialized before the database itself -->
+ <depends>jboss:service=Hypersonic,database=jbossidm</depends>
+ </local-tx-datasource>
+
+ <mbean code="org.jboss.jdbc.HypersonicDatabase"
name="jboss:service=Hypersonic,database=jbossidm">
+ <attribute name="Database">jbossidm</attribute>
+ <attribute name="InProcessMode">true</attribute>
+ </mbean>
+
+</datasources>