Author: bdaw
Date: 2009-11-16 06:04:22 -0500 (Mon, 16 Nov 2009)
New Revision: 956
Added:
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/MaterializedBlobType.java
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObject.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialType.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationship.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipName.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipType.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectType.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateRealm.hbm.xml
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/SimpleTestCase.java
Removed:
idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity-classes.cfg.xml
idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity.cfg.xml
Modified:
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad-local.xml
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad.xml
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-openldapds.xml
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-redhatds.xml
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-sunds.xml
idm/trunk/idm-testsuite/src/test/resources/test-identity-config.xml
Log:
another take on sybase binary mappings
Added:
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/MaterializedBlobType.java
===================================================================
---
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/MaterializedBlobType.java
(rev 0)
+++
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/MaterializedBlobType.java 2009-11-16
11:04:22 UTC (rev 956)
@@ -0,0 +1,52 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2009, 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.
+*/
+
+
+package org.jboss.identity.idm.impl.model.hibernate;
+
+import org.hibernate.type.AbstractBynaryType;
+
+import java.sql.Types;
+
+public class MaterializedBlobType extends AbstractBynaryType
+{
+
+ public int sqlType() {
+ return Types.BLOB;
+ }
+
+ public String getName() {
+ return "materialized-blob";
+ }
+
+ public Class getReturnedClass() {
+ return byte[].class;
+ }
+
+ protected Object toExternalFormat(byte[] bytes) {
+ return bytes;
+ }
+
+ protected byte[] toInternalFormat(Object bytes) {
+ return ( byte[] ) bytes;
+ }
+}
Modified:
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
===================================================================
---
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml 2009-11-16
09:16:38 UTC (rev 955)
+++
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -14,7 +14,7 @@
<property name="value"
type="org.hibernate.type.PrimitiveByteArrayBlobType"
access="field"
- lazy="true"
+ lazy="false"
not-null="true">
<column name="VALUE" length="10240000"/>
</property>
Modified:
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
===================================================================
---
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml 2009-11-16
09:16:38 UTC (rev 955)
+++
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -14,7 +14,7 @@
<property name="value"
type="org.hibernate.type.PrimitiveByteArrayBlobType"
access="field"
- lazy="true"
+ lazy="false"
not-null="true">
<column name="VALUE" length="10240000"/>
</property>
Added:
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObject.hbm.xml
===================================================================
---
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObject.hbm.xml
(rev 0)
+++
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObject.hbm.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class
name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"
+ table="jbid_io">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <set name="attributes"
+ inverse="true"
+ cascade="all, delete-orphan"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="IDENTITY_OBJECT_ID" />
+ </key>
+ <one-to-many
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute"
/>
+ </set>
+ <set name="credentials"
+ inverse="true"
+ cascade="all, delete-orphan"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="IDENTITY_OBJECT_ID" />
+ </key>
+ <one-to-many
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential"
/>
+ </set>
+ <set name="fromRelationships"
+ inverse="true"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="FROM_IDENTITY" />
+ </key>
+ <one-to-many
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship"
/>
+ </set>
+ <many-to-one name="identityType"
+
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType"
+ access="field"
+ fetch="join"
+ lazy="false">
+ <column name="IDENTITY_TYPE"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_io_props"
+ cascade="all, delete-orphan"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <many-to-one name="realm"
+
class="org.jboss.identity.idm.impl.model.hibernate.HibernateRealm"
+ access="field"
+ fetch="select">
+ <column name="REALM"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <set name="toRelationships"
+ inverse="true"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="TO_IDENTITY" />
+ </key>
+ <one-to-many
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship"
/>
+ </set>
+ </class>
+</hibernate-mapping>
Added:
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml
===================================================================
---
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml
(rev 0)
+++
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class
name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute"
+ table="jbid_io_attr">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ATTRIBUTE_ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="identityObject"
+
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="join">
+ <column name="IDENTITY_OBJECT_ID" not-null="true"
unique-key="id"/>
+ </many-to-one>
+ <property name="name"
+ type="java.lang.String"
+ access="property"
+ lazy="false">
+ <column name="NAME"
+ unique-key="id" />
+ </property>
+ <property name="type"
+ type="java.lang.String"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="ATTRIBUTE_TYPE"/>
+ </property>
+ <set name="textValues"
+ table="jbid_io_attr_text_values"
+ cascade="all, delete-orphan"
+ access="field"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="TEXT_ATTR_VALUE_ID"/>
+ <element type="string"
+ column="ATTR_VALUE"/>
+ </set>
+ <many-to-one name="binaryValue"
+
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
+ not-null="false"
+ column="BIN_VALUE_ID"
+ unique="true"
+ lazy="proxy"
+ access="field"
+ fetch="select"
+ cascade="all"/>
+ </class>
+</hibernate-mapping>
Added:
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
===================================================================
---
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
(rev 0)
+++
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class
name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
+ table="jbid_attr_bin_value">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="BIN_VALUE_ID" />
+ <generator class="native"/>
+ </id>
+ <property name="value"
+
type="org.jboss.identity.idm.impl.model.hibernate.MaterializedBlobType"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="VALUE" length="10240000"/>
+ </property>
+ </class>
+</hibernate-mapping>
Added:
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml
===================================================================
---
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml
(rev 0)
+++
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class
name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential"
+ table="jbid_io_creden">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="binaryValue"
+
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
+ not-null="false"
+ column="BIN_VALUE_ID"
+ unique="true"
+ lazy="proxy"
+ access="field"
+ fetch="select"
+ cascade="all"/>
+ <many-to-one name="identityObject"
+
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="IDENTITY_OBJECT_ID"
+ not-null="true"
+ unique-key="id" />
+ </many-to-one>
+ <map name="properties"
+ table="jbid_io_creden_props"
+ cascade="all, delete-orphan"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <property name="textValue"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="TEXT" />
+ </property>
+ <many-to-one name="type"
+
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"
+ access="field"
+ fetch="join"
+ lazy="false">
+ <column name="CREDENTIAL_TYPE"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ </class>
+</hibernate-mapping>
Added:
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
===================================================================
---
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
(rev 0)
+++
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class
name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
+ table="jbid_creden_bin_value">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="BIN_VALUE_ID" />
+ <generator class="native"/>
+ </id>
+ <property name="value"
+
type="org.jboss.identity.idm.impl.model.hibernate.MaterializedBlobType"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="VALUE" length="10240000"/>
+ </property>
+ </class>
+</hibernate-mapping>
Added:
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialType.hbm.xml
===================================================================
---
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialType.hbm.xml
(rev 0)
+++
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialType.hbm.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class
name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"
+ table="jbid_io_creden_type">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Added:
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationship.hbm.xml
===================================================================
---
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationship.hbm.xml
(rev 0)
+++
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationship.hbm.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class
name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship"
+ table="jbid_io_rel">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="fromIdentityObject"
+
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="FROM_IDENTITY"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="name"
+
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"
+ access="field"
+ fetch="join"
+ lazy="proxy">
+ <column name="NAME"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="toIdentityObject"
+
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="TO_IDENTITY"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="type"
+
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="REL_TYPE"
+ not-null="true"
+ unique-key="id" />
+ </many-to-one>
+ <map name="properties"
+ table="jbid_io_rel_props"
+ cascade="all, delete-orphan"
+ fetch="subselect"
+ lazy="true">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ </class>
+</hibernate-mapping>
Added:
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipName.hbm.xml
===================================================================
---
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipName.hbm.xml
(rev 0)
+++
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipName.hbm.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class
name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"
+ table="jbid_io_rel_name">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID"/>
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_io_rel_name_props"
+ cascade="all, delete-orphan"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <many-to-one name="realm"
+
class="org.jboss.identity.idm.impl.model.hibernate.HibernateRealm"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="REALM"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+
+ </class>
+</hibernate-mapping>
Added:
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipType.hbm.xml
===================================================================
---
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipType.hbm.xml
(rev 0)
+++
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipType.hbm.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class
name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"
+ table="jbid_io_rel_type">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Added:
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectType.hbm.xml
===================================================================
---
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectType.hbm.xml
(rev 0)
+++
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectType.hbm.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class
name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType"
+ table="jbid_io_type">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Added: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateRealm.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateRealm.hbm.xml
(rev 0)
+++
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateRealm.hbm.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateRealm"
+ table="jbid_realm">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_real_props"
+ cascade="all, delete-orphan"
+ fetch="subselect"
+ lazy="true">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ </class>
+</hibernate-mapping>
Modified:
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java
===================================================================
---
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java 2009-11-16
09:16:38 UTC (rev 955)
+++
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java 2009-11-16
11:04:22 UTC (rev 956)
@@ -93,18 +93,26 @@
hibernateSupport.setConfig(hibernateSupportConfig);
hibernateSupport.setJNDIName("java:/jbossidentity/HibernateStoreSessionFactory");
+ String prefix = "mappings/";
+
+ //Sybase support hack
+ if (dataSourceName.startsWith("sybase-"))
+ {
+ prefix = "sybase-mappings/";
+ }
+
List<String> mappings = new LinkedList<String>();
- mappings.add("mappings/HibernateIdentityObject.hbm.xml");
-
mappings.add("mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml");
-
mappings.add("mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectAttribute.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectCredential.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectCredentialType.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectRelationship.hbm.xml");
-
mappings.add("mappings/HibernateIdentityObjectRelationshipName.hbm.xml");
-
mappings.add("mappings/HibernateIdentityObjectRelationshipType.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectType.hbm.xml");
- mappings.add("mappings/HibernateRealm.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObject.hbm.xml");
+ mappings.add(prefix +
"HibernateIdentityObjectCredentialBinaryValue.hbm.xml");
+ mappings.add(prefix +
"HibernateIdentityObjectAttributeBinaryValue.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectAttribute.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectCredential.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectCredentialType.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectRelationship.hbm.xml");
+ mappings.add(prefix +
"HibernateIdentityObjectRelationshipName.hbm.xml");
+ mappings.add(prefix +
"HibernateIdentityObjectRelationshipType.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectType.hbm.xml");
+ mappings.add(prefix + "HibernateRealm.hbm.xml");
hibernateSupport.setMappings(mappings);
Added:
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/SimpleTestCase.java
===================================================================
---
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/SimpleTestCase.java
(rev 0)
+++
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/SimpleTestCase.java 2009-11-16
11:04:22 UTC (rev 956)
@@ -0,0 +1,140 @@
+/*
+* 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.
+*/
+
+package org.jboss.identity.idm.impl.api;
+
+import org.jboss.identity.idm.api.IdentitySessionFactory;
+import org.jboss.identity.idm.api.IdentitySession;
+import org.jboss.identity.idm.impl.IdentityTestPOJO;
+import org.jboss.identity.idm.impl.configuration.IdentityConfigurationImpl;
+import org.jboss.unit.api.pojo.annotations.Create;
+import org.jboss.unit.api.pojo.annotations.Destroy;
+import org.jboss.unit.api.pojo.annotations.Test;
+
+import java.util.logging.Logger;
+
+/**
+ * Some iteration to help find possible n+1 selects in logs.
+ *
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class SimpleTestCase extends IdentityTestPOJO implements APITestContext
+{
+ private static Logger log = Logger.getLogger(SimpleTestCase.class.getName());
+
+
+ IdentitySessionFactory identitySessionFactory;
+
+ @Create
+ public void setUp() throws Exception
+ {
+ super.start();
+
+ setRealmName("realm://RedHat/DB");
+
+
+ identitySessionFactory = new IdentityConfigurationImpl().
+ configure(getIdentityConfig()).buildIdentitySessionFactory();
+
+ log.fine("Statistics after IdentitySessionFactory creation:");
+ hibernateSupport.getSessionFactory().getStatistics().logSummary();
+
+ }
+
+ @Destroy
+ public void tearDown() throws Exception
+ {
+ super.stop();
+ }
+
+ public IdentitySessionFactory getIdentitySessionFactory()
+ {
+ return identitySessionFactory;
+ }
+
+ @Test
+ public void testPersistenceManager() throws Exception
+ {
+ IdentitySession session =
identitySessionFactory.createIdentitySession(getRealmName());
+
+
+ String ORGANIZATION = "ORGANIZATION";
+
+
+
+ for (int i = 0; i < 50; i++)
+ {
+ log.fine("\n\n\n### Create Group: " + i + "\n");
+
+ begin();
+ session.getPersistenceManager().createGroup("test" + i,
ORGANIZATION);
+ commit();
+
+ }
+
+ for (int i = 0; i < 50; i++)
+ {
+ log.fine("\n\n\n### Create User: " + i + "\n");
+
+ begin();
+ session.getPersistenceManager().createUser("test" + i);
+ commit();
+
+ }
+
+ String groupKey = session.getPersistenceManager().createGroupKey("test0",
ORGANIZATION);
+
+ for (int i = 0; i < 50; i++)
+ {
+ log.fine("\n\n\n### Associate User[" + i + "] to a Group" +
"\n");
+
+ begin();
+ session.getRelationshipManager().associateUserByKeys(groupKey, "test"
+ i);
+ commit();
+
+ }
+
+ begin();
+
+ groupKey = session.getPersistenceManager().createGroup("master",
ORGANIZATION).getKey();
+
+ commit();
+
+ for (int i = 0; i < 50; i++)
+ {
+ log.fine("\n\n\n### Associate Group[" + i + "] of type DEPARTMENT
to a Group" + groupKey + "\n");
+
+
+
+ begin();
+ String groupKey2 =
session.getPersistenceManager().createGroupKey("test" + i, ORGANIZATION);
+ session.getRelationshipManager().associateGroupsByKeys(groupKey, groupKey2);
+ commit();
+
+ }
+
+
+
+ }
+
+}
\ No newline at end of file
Modified:
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java
===================================================================
---
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java 2009-11-16
09:16:38 UTC (rev 955)
+++
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java 2009-11-16
11:04:22 UTC (rev 956)
@@ -94,7 +94,7 @@
Random random = new Random();
// Small
- byte[] picture = new byte[512];
+ byte[] picture = new byte[512000];
random.nextBytes(picture);
attr = new HibernateIdentityObjectAttribute(user1, "simple2",
HibernateIdentityObjectAttribute.TYPE_BINARY);
Deleted:
idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity-classes.cfg.xml
===================================================================
---
idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity-classes.cfg.xml 2009-11-16
09:16:38 UTC (rev 955)
+++
idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity-classes.cfg.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -1,48 +0,0 @@
-<?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.generate_statistics">true</property>
- <property name="hibernate.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>
-
- <!--<property
name="connection.datasource"></property>-->
-
- <property
name="hibernate.connection.url">jdbc:hsqldb:mem:unit-testing-jpa1</property>
- <property
name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property
name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
- <property
name="hibernate.hbm2ddl.auto">create-drop</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
-
- </session-factory>
-</hibernate-configuration>
\ No newline at end of file
Deleted: idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity.cfg.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity.cfg.xml 2009-11-16
09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity.cfg.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -1,63 +0,0 @@
-<?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.generate_statistics">true</property>
- <property name="hibernate.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>
-
- <!--<property
name="connection.datasource"></property>-->
-
- <property
name="hibernate.connection.url">jdbc:hsqldb:mem:unit-testing-jpa1</property>
- <property
name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property
name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
- <property
name="hibernate.hbm2ddl.auto">create-drop</property>
- <property
name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
-
- <!-- Mapping classes -->
- <!-- all nessesary mappings are added programatically to the configuration in
the store-->
- <!-- this is for manual SF creation or when 'addHibernateMappings' is
set to false in the store configuration-->
- <!--<mapping
resource="mappings/HibernateRealm.hbm.xml"/>-->
- <!--<mapping
resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>-->
- <!--<mapping
resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>-->
- <!--<mapping
resource="mappings/HibernateIdentityObject.hbm.xml"/>-->
- <!--<mapping
resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>-->
- <!--<mapping
resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>-->
- <!--<mapping
resource="mappings/HibernateIdentityObjectAttribute.hbm.xml"/>-->
- <!--<mapping
resource="mappings/HibernateIdentityObjectType.hbm.xml"/>-->
- <!--<mapping
resource="mappings/HibernateIdentityObjectRelationship.hbm.xml"/>-->
- <!--<mapping
resource="mappings/HibernateIdentityObjectRelationshipType.hbm.xml"/>-->
- <!--<mapping
resource="mappings/HibernateIdentityObjectRelationshipName.hbm.xml"/>-->
-
- </session-factory>
-</hibernate-configuration>
\ No newline at end of file
Modified: idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad-local.xml
===================================================================
---
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad-local.xml 2009-11-16
09:16:38 UTC (rev 955)
+++
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad-local.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -204,6 +204,7 @@
</relationships>
<credentials>
<credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</credential-type>
</credentials>
<attributes>
<attribute>
Modified: idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad.xml 2009-11-16
09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -176,6 +176,7 @@
</relationships>
<credentials>
<credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</credential-type>
</credentials>
<attributes>
<attribute>
Modified: idm/trunk/idm-testsuite/src/test/resources/test-identity-config-openldapds.xml
===================================================================
---
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-openldapds.xml 2009-11-16
09:16:38 UTC (rev 955)
+++
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-openldapds.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -204,6 +204,7 @@
</relationships>
<credentials>
<credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</credential-type>
</credentials>
<attributes>
<attribute>
Modified: idm/trunk/idm-testsuite/src/test/resources/test-identity-config-redhatds.xml
===================================================================
---
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-redhatds.xml 2009-11-16
09:16:38 UTC (rev 955)
+++
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-redhatds.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -204,6 +204,7 @@
</relationships>
<credentials>
<credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</credential-type>
</credentials>
<attributes>
<attribute>
Modified: idm/trunk/idm-testsuite/src/test/resources/test-identity-config-sunds.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/test-identity-config-sunds.xml 2009-11-16
09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/resources/test-identity-config-sunds.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -204,6 +204,7 @@
</relationships>
<credentials>
<credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</credential-type>
</credentials>
<attributes>
<attribute>
Modified: idm/trunk/idm-testsuite/src/test/resources/test-identity-config.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/test-identity-config.xml 2009-11-16
09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/resources/test-identity-config.xml 2009-11-16
11:04:22 UTC (rev 956)
@@ -215,6 +215,7 @@
<relationships/>
<credentials>
<credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</credential-type>
</credentials>
<attributes>
<attribute>