Author: jeff.yuchang
Date: 2009-06-01 02:22:01 -0400 (Mon, 01 Jun 2009)
New Revision: 549
Added:
idm/trunk/assembly/src/main/config/mssql.hibernate.cfg.xml
idm/trunk/assembly/src/main/files/db/hibernate.cfg/mssql.hibernate.cfg.xml
idm/trunk/assembly/src/main/files/db/jdbc/mssql.properties
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-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-mssql-ds.xml
idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/mssql.hibernate.cfg.xml
Modified:
idm/trunk/assembly/pom.xml
idm/trunk/assembly/scripts/antrun-schema.xml
idm/trunk/assembly/scripts/assembly-distro.xml
idm/trunk/assembly/src/main/files/db/jdbc/mysql.properties
idm/trunk/assembly/src/main/files/db/jdbc/oracle.properties
idm/trunk/assembly/src/main/files/db/jdbc/postgresql.properties
idm/trunk/assembly/src/main/files/db/jdbc/sybase.properties
idm/trunk/assembly/src/main/files/jboss/build.xml
idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-sybase-ds.xml
idm/trunk/example/simple/src/test/java/org/jboss/identity/idm/example/InjectSFTestCase.java
idm/trunk/idm-cache/pom.xml
Log:
* Add the mssql, sybase db configuration.
* Using the deployer solution in the jboss deployment, instead of MBean as it was.
Modified: idm/trunk/assembly/pom.xml
===================================================================
--- idm/trunk/assembly/pom.xml 2009-06-01 05:56:51 UTC (rev 548)
+++ idm/trunk/assembly/pom.xml 2009-06-01 06:22:01 UTC (rev 549)
@@ -75,6 +75,22 @@
<version>${idm.version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.identity.idm.integration</groupId>
+ <artifactId>idm-jboss5-deployer</artifactId>
+ <classifier>config</classifier>
+ <type>zip</type>
+ <version>${idm.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.identity.idm.integration</groupId>
+ <artifactId>idm-jboss5-deployer</artifactId>
+ <classifier>deployer</classifier>
+ <type>zip</type>
+ <version>${idm.version}</version>
+ </dependency>
+
+
+ <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>${hibernate-commons-annotations}</version>
Modified: idm/trunk/assembly/scripts/antrun-schema.xml
===================================================================
--- idm/trunk/assembly/scripts/antrun-schema.xml 2009-06-01 05:56:51 UTC (rev 548)
+++ idm/trunk/assembly/scripts/antrun-schema.xml 2009-06-01 06:22:01 UTC (rev 549)
@@ -41,7 +41,13 @@
<!-- PostgreSQL -->
<create-ddl db="postgresql"/>
+
+ <!-- Sybase -->
+ <create-ddl db="sybase" />
+ <!-- MSSQL -->
+ <create-ddl db="mssql" />
+
</target>
<!--
Modified: idm/trunk/assembly/scripts/assembly-distro.xml
===================================================================
--- idm/trunk/assembly/scripts/assembly-distro.xml 2009-06-01 05:56:51 UTC (rev 548)
+++ idm/trunk/assembly/scripts/assembly-distro.xml 2009-06-01 06:22:01 UTC (rev 549)
@@ -18,7 +18,7 @@
<!-- useStrictFiltering>true</useStrictFiltering -->
<unpack>false</unpack>
<scope>test</scope>
- <excludes>
+ <!-- excludes>
<exclude>org.jboss.identity.idm.integration:idm-jboss5</exclude>
<exclude>org.jboss.identity.idm:idm-cache</exclude>
<exclude>org.jboss.identity.idm:idm-ldap</exclude>
@@ -28,20 +28,27 @@
<exclude>org.jboss.identity.idm:idm-common</exclude>
<exclude>org.jboss.identity.idm:idm-spi</exclude>
<exclude>org.jboss.identity.idm:idm-assembly</exclude>
- </excludes>
+ </excludes-->
<outputDirectory>lib</outputDirectory>
</dependencySet>
- <!-- modules -->
+ <!-- modules -->
<dependencySet>
<outputDirectory>modules</outputDirectory>
<useStrictFiltering>true</useStrictFiltering>
<includes>
-
<include>org.jboss.identity.idm.integration:idm-jboss5:zip:config</include>
+
<include>org.jboss.identity.idm.integration:idm-jboss5-deployer:zip:deployer</include>
</includes>
<unpack>true</unpack>
</dependencySet>
-
+ <dependencySet>
+ <outputDirectory>modules</outputDirectory>
+ <useStrictFiltering>true</useStrictFiltering>
+ <includes>
+
<include>org.jboss.identity.idm.integration:idm-jboss5-deployer:zip:config</include>
+ </includes>
+ <unpack>true</unpack>
+ </dependencySet>
</dependencySets>
<fileSets>
Added: idm/trunk/assembly/src/main/config/mssql.hibernate.cfg.xml
===================================================================
--- idm/trunk/assembly/src/main/config/mssql.hibernate.cfg.xml
(rev 0)
+++ idm/trunk/assembly/src/main/config/mssql.hibernate.cfg.xml 2009-06-01 06:22:01 UTC
(rev 549)
@@ -0,0 +1,52 @@
+<?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.SQLServerDialect</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/mssql.hibernate.cfg.xml
===================================================================
--- idm/trunk/assembly/src/main/files/db/hibernate.cfg/mssql.hibernate.cfg.xml
(rev 0)
+++ idm/trunk/assembly/src/main/files/db/hibernate.cfg/mssql.hibernate.cfg.xml 2009-06-01
06:22:01 UTC (rev 549)
@@ -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.SQLServerDialect</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>
Added: idm/trunk/assembly/src/main/files/db/jdbc/mssql.properties
===================================================================
--- idm/trunk/assembly/src/main/files/db/jdbc/mssql.properties
(rev 0)
+++ idm/trunk/assembly/src/main/files/db/jdbc/mssql.properties 2009-06-01 06:22:01 UTC
(rev 549)
@@ -0,0 +1,4 @@
+jdbc.driver=net.sourceforge.jtds.jdbc.Driver
+jdbc.url=jdbc:jtds:sqlserver://dev30.qa.atl.jboss.com:3918/portal
+jdbc.username=portal
+jdbc.password=password
Modified: idm/trunk/assembly/src/main/files/db/jdbc/mysql.properties
===================================================================
--- idm/trunk/assembly/src/main/files/db/jdbc/mysql.properties 2009-06-01 05:56:51 UTC
(rev 548)
+++ idm/trunk/assembly/src/main/files/db/jdbc/mysql.properties 2009-06-01 06:22:01 UTC
(rev 549)
@@ -1,4 +1,4 @@
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/jbossidm
-jdbc.username=jbossidm
+jdbc.username=root
jdbc.password=
Modified: idm/trunk/assembly/src/main/files/db/jdbc/oracle.properties
===================================================================
--- idm/trunk/assembly/src/main/files/db/jdbc/oracle.properties 2009-06-01 05:56:51 UTC
(rev 548)
+++ idm/trunk/assembly/src/main/files/db/jdbc/oracle.properties 2009-06-01 06:22:01 UTC
(rev 549)
@@ -1,4 +1,4 @@
jdbc.driver=oracle.jdbc.driver.OracleDriver
-jdbc.url=jdbc:oracle:thin:@localhost:1521:jbossidm
-jdbc.username=jbossidm
-jdbc.password=jbossidm
+jdbc.url=jdbc:oracle:thin:@dev20.qa.atl.jboss.com:1521:qa
+jdbc.username=portal
+jdbc.password=password
Modified: idm/trunk/assembly/src/main/files/db/jdbc/postgresql.properties
===================================================================
--- idm/trunk/assembly/src/main/files/db/jdbc/postgresql.properties 2009-06-01 05:56:51
UTC (rev 548)
+++ idm/trunk/assembly/src/main/files/db/jdbc/postgresql.properties 2009-06-01 06:22:01
UTC (rev 549)
@@ -1,7 +1,7 @@
jdbc.driver=org.postgresql.Driver
jdbc.port=5432
-jdbc.server=localhost
-jdbc.databasename=jbossidm
-jdbc.url=jdbc:postgresql://localhost:5432/jbossidm
-jdbc.username=jbossidm
-jdbc.password=jbossidm
+jdbc.server=dev01.qa.atl.jboss.com
+jdbc.databasename=portal
+jdbc.url=jdbc:postgresql://dev01.qa.atl.jboss.com:5432:portal
+jdbc.username=portal
+jdbc.password=password
Modified: idm/trunk/assembly/src/main/files/db/jdbc/sybase.properties
===================================================================
--- idm/trunk/assembly/src/main/files/db/jdbc/sybase.properties 2009-06-01 05:56:51 UTC
(rev 548)
+++ idm/trunk/assembly/src/main/files/db/jdbc/sybase.properties 2009-06-01 06:22:01 UTC
(rev 549)
@@ -1,5 +1,5 @@
jdbc.driver=net.sourceforge.jtds.jdbc.Driver
# jdbc.driver=com.sybase.jdbc3.jdbc.SybDriver
-jdbc.url=jdbc:sybase:Tds:localhost:5000/jbossidm
-jdbc.username=jbossidm
-jdbc.password=jbossidm
+jdbc.url=jdbc:jtds:sybase://dev77.qa.atl2.redhat.com:4100/jbidentity
+jdbc.username=jbidentity
+jdbc.password=jbidentity
Modified: idm/trunk/assembly/src/main/files/jboss/build.xml
===================================================================
--- idm/trunk/assembly/src/main/files/jboss/build.xml 2009-06-01 05:56:51 UTC (rev 548)
+++ idm/trunk/assembly/src/main/files/jboss/build.xml 2009-06-01 06:22:01 UTC (rev 549)
@@ -27,26 +27,39 @@
<antcall target="internal.install.jbossidm.into.jboss5" />
<antcall target="internal.install.jbossidm.into.jboss.db.${database}"
/>
</target>
+
+ <target name="uninstall.jbossidm" description="uninstall jbossidm from
jboss">
+ <delete dir="${jboss.server.config.dir}/deploy/idm" />
+ <delete dir="${jboss.server.config.dir}/deployers/idm-deployer" />
+ </target>
<!-- ### THE JBOSS GENERIC PART ######################################### -->
<target name="internal.install.jbossidm.into.jboss5">
- <copy todir="${jboss.server.config.dir}/deploy/idm"
overwrite="true">
- <fileset dir="${jbossidm.home}/modules/" />
+ <copy todir="${jboss.server.config.dir}/deploy/idm/idm-service.sar"
overwrite="true">
+ <fileset dir="${jbossidm.home}/modules/idm-service.sar" />
</copy>
+ <!-- ### Update the default-jboss-idm.xml #### -->
+ <copy
file="${jbossidm.home}/modules/idm-service.sar/META-INF/default-jboss-idm.xml"
+
toFile="${jboss.server.config.dir}/deploy/idm/idm-service.sar/META-INF/default-jboss-idm.xml"
+ overwrite="true">
+ <filterset>
+ <filter token="database" value="${database}"/>
+ </filterset>
+ </copy>
+
+ <copy todir="${jboss.server.config.dir}/deployers/idm-deployer"
overwrite="true">
+ <fileset dir="${jbossidm.home}/modules/idm-deployer" />
+ </copy>
+
<!-- copy the sql scripts -->
<copy
todir="${jboss.server.config.dir}/deploy/idm/idm-service.sar/idm-sql">
<fileset dir="${jbossidm.home}/db/schema.scripts">
<include name="*.sql"/>
</fileset>
- </copy>
+ </copy>
- <!-- copy the right jboss-bean deployment file -->
- <copy
file="${jbossidm.home}/jboss/config.jboss5/deploy/idm-service/idm-service-${database}-jboss-beans.xml"
-
tofile="${jboss.server.config.dir}/deploy/idm/idm-service.sar/META-INF/idm-service-jboss-beans.xml"
- overwrite="true" />
-
<!-- copy the right hibernate configuration file -->
<copy
file="${jbossidm.home}/jboss/hibernate.cfg/${database}.hibernate.cfg.xml"
tofile="${jboss.server.config.dir}/deploy/idm/idm-service.sar/jboss.idm.hibernate.cfg.xml"
@@ -88,6 +101,17 @@
<copy file="${jbossidm.home}/lib/postgresql.jar"
todir="${jboss.server.config.dir}/deploy/idm/idm-service.sar" />
</target>
+
+ <!--### THE SYBASE SPECIFIC PART ######################################## -->
+ <target name="internal.install.jbossidm.into.jboss.db.sybase">
+ <copy file="${jbossidm.home}/lib/jtds.jar"
+ todir="${jboss.server.config.dir}/deploy/idm/idm-service.sar"
/>
+ </target>
+ <!--### THE MSSQL SPECIFIC PART ######################################## -->
+ <target name="internal.install.jbossidm.into.jboss.db.mssql">
+ <copy file="${jbossidm.home}/lib/jtds.jar"
+ todir="${jboss.server.config.dir}/deploy/idm/idm-service.sar"
/>
+ </target>
</project>
Added:
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
(rev 0)
+++
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-mssql-jboss-beans.xml 2009-06-01
06:22:01 UTC (rev 549)
@@ -0,0 +1,21 @@
+<?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>
+ <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>
+ <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
Added:
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
(rev 0)
+++
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-postgresql-jboss-beans.xml 2009-06-01
06:22:01 UTC (rev 549)
@@ -0,0 +1,21 @@
+<?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>
+ <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>
+ <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
Added:
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
(rev 0)
+++
idm/trunk/assembly/src/main/files/jboss/config.jboss5/deploy/idm-service/idm-service-sybase-jboss-beans.xml 2009-06-01
06:22:01 UTC (rev 549)
@@ -0,0 +1,21 @@
+<?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>
+ <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>
+ <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
Added: idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-mssql-ds.xml
===================================================================
--- idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-mssql-ds.xml
(rev 0)
+++ idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-mssql-ds.xml 2009-06-01
06:22:01 UTC (rev 549)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>jbossidmDS</jndi-name>
+ <connection-url>@jdbc.url(a)</connection-url>
+ <driver-class>@jdbc.driver(a)</driver-class>
+ <user-name>@jdbc.username(a)</user-name>
+ <password>@jdbc.password(a)</password>
+
+ <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional)
-->
+ <metadata>
+ <type-mapping>MS SQLSERVER2000</type-mapping>
+ </metadata>
+ </local-tx-datasource>
+
+</datasources>
Modified: idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-sybase-ds.xml
===================================================================
--- idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-sybase-ds.xml 2009-06-01
05:56:51 UTC (rev 548)
+++ idm/trunk/assembly/src/main/files/jboss/datasources/jbidm-sybase-ds.xml 2009-06-01
06:22:01 UTC (rev 549)
@@ -1,27 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
-
- <xa-datasource>
+ <local-tx-datasource>
<jndi-name>jbossidmDS</jndi-name>
-
- <xa-datasource-class>@jdbc.sybase.datasource(a)</xa-datasource-class>
- <xa-datasource-property
name="URL">@jdbc.url(a)</xa-datasource-property>
+ <connection-url>@jdbc.url(a)</connection-url>
+ <driver-class>@jdbc.driver(a)</driver-class>
<user-name>@jdbc.username(a)</user-name>
<password>@jdbc.password(a)</password>
+
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
+ <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional)
-->
+ <metadata>
+ <type-mapping>Sybase</type-mapping>
+ </metadata>
+ </local-tx-datasource>
- <!-- disable transaction interleaving -->
- <track-connection-by-tx />
-
- <exception-sorter-class-name>
- org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter
- </exception-sorter-class-name>
-
- <!-- corresponding type-mapping in conf/standardjbosscmp-jdbc.xml -->
- <metadata>
- <type-mapping>Sybase</type-mapping>
- </metadata>
- </xa-datasource>
-
</datasources>
+
Added: idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/mssql.hibernate.cfg.xml
===================================================================
--- idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/mssql.hibernate.cfg.xml
(rev 0)
+++
idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/mssql.hibernate.cfg.xml 2009-06-01
06:22:01 UTC (rev 549)
@@ -0,0 +1,64 @@
+<?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.SQLServerDialect</property>
+ <property
name="hibernate.connection.datasource">java:jbossidmDS</property>
+ <property
name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property
name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property
name="jta.UserTransaction">UserTransaction</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/example/simple/src/test/java/org/jboss/identity/idm/example/InjectSFTestCase.java
===================================================================
---
idm/trunk/example/simple/src/test/java/org/jboss/identity/idm/example/InjectSFTestCase.java 2009-06-01
05:56:51 UTC (rev 548)
+++
idm/trunk/example/simple/src/test/java/org/jboss/identity/idm/example/InjectSFTestCase.java 2009-06-01
06:22:01 UTC (rev 549)
@@ -70,7 +70,7 @@
public void testInjectSessionFactory() throws Exception
{
IdentityConfiguration identityConfiguration = new IdentityConfigurationImpl().
- configure(new File("src/test/resources/example-db-config.xml"));
+ configure(new
File("src/test/resources/example-db-inject-sf-config.xml"));
SessionFactory hibernateSessionFactory = new
AnnotationConfiguration().configure("hibernate-jboss-identity-classes.cfg.xml")
.buildSessionFactory();
@@ -164,8 +164,10 @@
identitySession.getTransaction().commit();
identitySession.close();
+
+
+ System.out.println("Done");
-
}
}
Modified: idm/trunk/idm-cache/pom.xml
===================================================================
--- idm/trunk/idm-cache/pom.xml 2009-06-01 05:56:51 UTC (rev 548)
+++ idm/trunk/idm-cache/pom.xml 2009-06-01 06:22:01 UTC (rev 549)
@@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>idm-cache</artifactId>
<packaging>jar</packaging>
- <name>JBoss Identity IDM Cachen</name>
+ <name>JBoss Identity IDM Cache</name>
<
url>http://labs.jboss.org/portal/jbosssecurity/</url>
<description>JBoss Identity IDM Cache</description>
<licenses>