Author: jeff.yuchang
Date: 2009-05-28 13:17:16 -0400 (Thu, 28 May 2009)
New Revision: 540
Added:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/HibernateDeployerType.java
idm/trunk/integration/deployer/src/test/resources/jbpm.identity/
idm/trunk/integration/deployer/src/test/resources/jbpm.identity/META-INF/
idm/trunk/integration/deployer/src/test/resources/jbpm.identity/META-INF/jbpm-jboss-idm.xml
idm/trunk/integration/deployer/src/test/resources/jbpm.identity/jbpm.idm.cfg.xml
Modified:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMConfigParsingDeployer.java
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMDeployer.java
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/HibernateInitializerType.java
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/InitializerType.java
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/JbossIDMDeployerType.java
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/ObjectFactory.java
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/OptionType.java
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/OptionsType.java
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/SqlInitializerType.java
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/package-info.java
idm/trunk/integration/deployer/src/main/resources/META-INF/default-jboss-idm.xml
idm/trunk/integration/deployer/src/main/resources/identity-deployer.xsd
idm/trunk/integration/deployer/src/main/resources/jboss.idm.cfg.xml
Log:
* Update the deployer schema, (make the default hibernate cfg file in the JNDI,
so that others can reuse the defaultHibernateSessionFactory).
* Add the jbpm.identity as a test case.
Modified:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMConfigParsingDeployer.java
===================================================================
---
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMConfigParsingDeployer.java 2009-05-28
14:04:33 UTC (rev 539)
+++
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMConfigParsingDeployer.java 2009-05-28
17:17:16 UTC (rev 540)
@@ -33,8 +33,7 @@
metaData.setDeployerFileName(file.getPathName());
JbossIDMDeployerType deployerMetadata =
JAXB2IdentityDeployerConfiguration.createDeployerConfiguration(file.openStream());
- metaData.setDeploperType(deployerMetadata);
-
+ metaData.setDeploperType(deployerMetadata);
logger.fine("the configuration file path name is: [" + file.getPathName() +
"]");
return metaData;
Modified:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMDeployer.java
===================================================================
---
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMDeployer.java 2009-05-28
14:04:33 UTC (rev 539)
+++
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMDeployer.java 2009-05-28
17:17:16 UTC (rev 540)
@@ -10,9 +10,12 @@
import java.util.logging.Logger;
import javax.naming.InitialContext;
+import javax.naming.NamingException;
import javax.sql.DataSource;
import javax.transaction.TransactionManager;
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.DialectFactory;
import org.jboss.deployers.spi.DeploymentException;
@@ -20,9 +23,11 @@
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.identity.idm.api.IdentitySessionFactory;
import org.jboss.identity.idm.api.cfg.IdentityConfiguration;
+import org.jboss.identity.idm.common.exception.IdentityException;
import org.jboss.identity.idm.common.transaction.Transactions;
import org.jboss.identity.idm.impl.configuration.IdentityConfigurationImpl;
import org.jboss.identity.idm.impl.configuration.jaxb2.JAXB2IdentityConfiguration;
+import org.jboss.identity.idm.integration.jboss5.jaxb2.HibernateDeployerType;
import org.jboss.identity.idm.integration.jboss5.jaxb2.HibernateInitializerType;
import org.jboss.identity.idm.integration.jboss5.jaxb2.JbossIDMDeployerType;
import org.jboss.identity.idm.integration.jboss5.jaxb2.SqlInitializerType;
@@ -44,8 +49,12 @@
private IdentitySessionFactory idSF;
+ private SessionFactory hibernateSF;
+
private TransactionManager transactionManager;
+ private IdentityConfiguration identityConfiguration;
+
public IDMDeployer() {
super(IDMMetadata.class);
}
@@ -54,36 +63,17 @@
public void deploy(VFSDeploymentUnit deploymentUnit, IDMMetadata metadata) throws
DeploymentException {
JbossIDMDeployerType config = metadata.getDeploperType();
- try {
-
+ try {
InputStream is =
deploymentUnit.getClassLoader().getResourceAsStream(config.getIdmConfigFile());
IdentityConfigurationMetaData identityMetadata =
JAXB2IdentityConfiguration.createConfigurationMetaData(is);
- final IdentityConfiguration identityConfiguration = new
IdentityConfigurationImpl().configure(identityMetadata);
+ identityConfiguration = new IdentityConfigurationImpl().configure(identityMetadata);
+ if (config.getHibernateDeployer() != null) {
+ deployHibernateConfigurationFile(config, identityConfiguration);
+ }
+
if (config.getInitializers() != null) {
- logger.fine("starting to populate the schema into db");
- String datasource = config.getInitializers().getDatasource();
-
- checkTargetDB(config.getInitializers().getDatasource());
-
- HibernateInitializerType hibernateInitializer =
config.getInitializers().getHibernateInitializer();
- SqlInitializerType sqlInitializer = config.getInitializers().getSqlInitializer();
-
- if (hibernateInitializer != null) {
- for (IdentityStoreConfigurationMetaData store :
identityMetadata.getIdentityStores()) {
- String hibernateConfigFile = store.getOptionSingleValue(HIBERNATE_CONFIGFILE);
- if (hibernateConfigFile != null &&
!"".equals(hibernateConfigFile.trim())) {
- logger.fine("starting to populate the schema from file [" +
hibernateConfigFile + "]");
- HibernatePopulator hibernatePopulator = new
HibernatePopulator(hibernateInitializer, identityConfiguration);
- hibernatePopulator.populateSchema();
- }
- }
-
- }else if (sqlInitializer != null) {
- logger.fine("starting to populate the schema from script file [" +
sqlInitializer.getSqlFile() + "]");
- SQLPopulator sqlPopulator = new SQLPopulator(datasource,
sqlInitializer.getSqlFile(), sqlInitializer.getExitSQL());
- sqlPopulator.populateSchema();
- }
+ initializeDB(config, identityMetadata, identityConfiguration);
}
try {
@@ -101,14 +91,58 @@
InitialContext context = new InitialContext();
context.bind(config.getJNDIName(), idSF);
- logger.info("Started the JBoss Identity Management Service");
+ logger.info("Started [" + metadata.getDeployerFileName() + "] IDM
SessionFactory at JNDI [" + config.getJNDIName() + "]");
} catch (Exception e) {
throw new DeploymentException(e);
}
}
+
+ private void initializeDB(JbossIDMDeployerType config, IdentityConfigurationMetaData
identityMetadata,
+ final IdentityConfiguration identityConfiguration) throws Exception {
+ logger.fine("starting to populate the schema into db");
+
+ String datasource = config.getInitializers().getDatasource();
+ checkTargetDB(config.getInitializers().getDatasource());
+
+ HibernateInitializerType hibernateInitializer =
config.getInitializers().getHibernateInitializer();
+ SqlInitializerType sqlInitializer = config.getInitializers().getSqlInitializer();
+
+ if (hibernateInitializer != null) {
+ for (IdentityStoreConfigurationMetaData store : identityMetadata.getIdentityStores())
{
+ String hibernateConfigFile = store.getOptionSingleValue(HIBERNATE_CONFIGFILE);
+ if (hibernateConfigFile != null &&
!"".equals(hibernateConfigFile.trim())) {
+ logger.fine("starting to populate the schema from file [" +
hibernateConfigFile + "]");
+ HibernatePopulator hibernatePopulator = new HibernatePopulator(hibernateInitializer,
identityConfiguration);
+ hibernatePopulator.populateSchema();
+ }
+ }
+
+ }else if (sqlInitializer != null) {
+ logger.fine("starting to populate the schema from script file [" +
sqlInitializer.getSqlFile() + "]");
+ SQLPopulator sqlPopulator = new SQLPopulator(datasource, sqlInitializer.getSqlFile(),
sqlInitializer.getExitSQL());
+ sqlPopulator.populateSchema();
+ }
+ }
+
+ private void deployHibernateConfigurationFile(JbossIDMDeployerType config,
+ final IdentityConfiguration identityConfiguration) throws NamingException,
IdentityException {
+ HibernateDeployerType hibernateConfig = config.getHibernateDeployer();
+ hibernateSF = new AnnotationConfiguration().
+ configure(hibernateConfig.getHibernateConfiguration()).buildSessionFactory();
+ if (hibernateConfig.getHibernateSessionFactoryJNDIName() != null) {
+ InitialContext context = new InitialContext();
+ context.bind(hibernateConfig.getHibernateSessionFactoryJNDIName(), hibernateSF);
+ logger.fine("Registered the Hibernate Session Factory in JNDI of " +
hibernateConfig.getHibernateSessionFactoryJNDIName());
+ }
+ if (hibernateConfig.getHibernateSessionFactoryRegistryName() != null) {
+ identityConfiguration.getIdentityConfigurationRegistry().register(hibernateSF,
hibernateConfig.getHibernateSessionFactoryRegistryName());
+ logger.fine("Registered the Hibernate Session Factory in Identity Registration of
" + hibernateConfig.getHibernateSessionFactoryRegistryName());
+ }
+ }
+
@Override
public void undeploy(VFSDeploymentUnit deploymentUnit, IDMMetadata metadata) {
if (idSF != null) {
@@ -118,12 +152,27 @@
try {
InitialContext context = new InitialContext();
context.unbind(metadata.getDeploperType().getJNDIName());
+
+ if (metadata.getDeploperType().getHibernateDeployer() != null) {
+
+ if (hibernateSF != null) {
+ hibernateSF.close();
+ }
+
+ HibernateDeployerType hibernateDeployer =
metadata.getDeploperType().getHibernateDeployer();
+ if (hibernateDeployer.getHibernateSessionFactoryJNDIName() != null) {
+ context.unbind(hibernateDeployer.getHibernateSessionFactoryJNDIName());
+ }
+ if (hibernateDeployer.getHibernateSessionFactoryRegistryName() != null) {
+ identityConfiguration.getIdentityConfigurationRegistry().unregister(hibernateDeployer.getHibernateSessionFactoryRegistryName());
+ }
+ }
} catch (Exception e) {
logger.severe(e.getMessage());
throw new RuntimeException(e);
}
- logger.info("Stopped the JBoss IDM Service");
+ logger.info("Stopped [" + metadata.getDeployerFileName() + "] IDM
SessionFactory at JNDI [" + metadata.getDeploperType().getJNDIName() +
"]");
}
Added:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/HibernateDeployerType.java
===================================================================
---
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/HibernateDeployerType.java
(rev 0)
+++
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/HibernateDeployerType.java 2009-05-28
17:17:16 UTC (rev 540)
@@ -0,0 +1,125 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.1-619
+// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2009.05.28 at 11:27:34 PM CST
+//
+
+
+package org.jboss.identity.idm.integration.jboss5.jaxb2;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for hibernateDeployerType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="hibernateDeployerType">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="hibernateConfiguration"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <choice>
+ * <element name="hibernateSessionFactoryRegistryName"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="hibernateSessionFactoryJNDIName"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </choice>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "hibernateDeployerType", propOrder = {
+ "hibernateConfiguration",
+ "hibernateSessionFactoryRegistryName",
+ "hibernateSessionFactoryJNDIName"
+})
+public class HibernateDeployerType {
+
+ @XmlElement(required = true)
+ protected String hibernateConfiguration;
+ protected String hibernateSessionFactoryRegistryName;
+ protected String hibernateSessionFactoryJNDIName;
+
+ /**
+ * Gets the value of the hibernateConfiguration property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getHibernateConfiguration() {
+ return hibernateConfiguration;
+ }
+
+ /**
+ * Sets the value of the hibernateConfiguration property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setHibernateConfiguration(String value) {
+ this.hibernateConfiguration = value;
+ }
+
+ /**
+ * Gets the value of the hibernateSessionFactoryRegistryName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getHibernateSessionFactoryRegistryName() {
+ return hibernateSessionFactoryRegistryName;
+ }
+
+ /**
+ * Sets the value of the hibernateSessionFactoryRegistryName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setHibernateSessionFactoryRegistryName(String value) {
+ this.hibernateSessionFactoryRegistryName = value;
+ }
+
+ /**
+ * Gets the value of the hibernateSessionFactoryJNDIName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getHibernateSessionFactoryJNDIName() {
+ return hibernateSessionFactoryJNDIName;
+ }
+
+ /**
+ * Sets the value of the hibernateSessionFactoryJNDIName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setHibernateSessionFactoryJNDIName(String value) {
+ this.hibernateSessionFactoryJNDIName = value;
+ }
+
+}
Modified:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/HibernateInitializerType.java
===================================================================
---
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/HibernateInitializerType.java 2009-05-28
14:04:33 UTC (rev 539)
+++
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/HibernateInitializerType.java 2009-05-28
17:17:16 UTC (rev 540)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.1-619
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.20 at 03:35:46 PM CST
+// Generated on: 2009.05.28 at 11:27:34 PM CST
//
Modified:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/InitializerType.java
===================================================================
---
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/InitializerType.java 2009-05-28
14:04:33 UTC (rev 539)
+++
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/InitializerType.java 2009-05-28
17:17:16 UTC (rev 540)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.1-619
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.20 at 03:35:46 PM CST
+// Generated on: 2009.05.28 at 11:27:34 PM CST
//
Modified:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/JbossIDMDeployerType.java
===================================================================
---
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/JbossIDMDeployerType.java 2009-05-28
14:04:33 UTC (rev 539)
+++
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/JbossIDMDeployerType.java 2009-05-28
17:17:16 UTC (rev 540)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.1-619
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.20 at 03:35:46 PM CST
+// Generated on: 2009.05.28 at 11:27:34 PM CST
//
@@ -28,7 +28,7 @@
* <sequence>
* <element name="JNDIName"
type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="idmConfigFile"
type="{http://www.w3.org/2001/XMLSchema}string"/>
- * <element name="jmxObjectName"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="hibernateDeployer"
type="{urn:jboss:identity:idm:deployer:v1_0_alpha}hibernateDeployerType"
minOccurs="0"/>
* <element name="initializers"
type="{urn:jboss:identity:idm:deployer:v1_0_alpha}initializerType"
minOccurs="0"/>
* <element name="options"
type="{urn:jboss:identity:idm:deployer:v1_0_alpha}optionsType"
minOccurs="0"/>
* <element name="depends"
type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"
minOccurs="0"/>
@@ -44,7 +44,7 @@
@XmlType(name = "jbossIDMDeployerType", propOrder = {
"jndiName",
"idmConfigFile",
- "jmxObjectName",
+ "hibernateDeployer",
"initializers",
"options",
"depends"
@@ -55,8 +55,7 @@
protected String jndiName;
@XmlElement(required = true)
protected String idmConfigFile;
- @XmlElement(required = true)
- protected String jmxObjectName;
+ protected HibernateDeployerType hibernateDeployer;
protected InitializerType initializers;
protected OptionsType options;
protected List<String> depends;
@@ -110,27 +109,27 @@
}
/**
- * Gets the value of the jmxObjectName property.
+ * Gets the value of the hibernateDeployer property.
*
* @return
* possible object is
- * {@link String }
+ * {@link HibernateDeployerType }
*
*/
- public String getJmxObjectName() {
- return jmxObjectName;
+ public HibernateDeployerType getHibernateDeployer() {
+ return hibernateDeployer;
}
/**
- * Sets the value of the jmxObjectName property.
+ * Sets the value of the hibernateDeployer property.
*
* @param value
* allowed object is
- * {@link String }
+ * {@link HibernateDeployerType }
*
*/
- public void setJmxObjectName(String value) {
- this.jmxObjectName = value;
+ public void setHibernateDeployer(HibernateDeployerType value) {
+ this.hibernateDeployer = value;
}
/**
Modified:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/ObjectFactory.java
===================================================================
---
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/ObjectFactory.java 2009-05-28
14:04:33 UTC (rev 539)
+++
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/ObjectFactory.java 2009-05-28
17:17:16 UTC (rev 540)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.1-619
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.20 at 03:35:46 PM CST
+// Generated on: 2009.05.28 at 11:27:34 PM CST
//
@@ -41,11 +41,11 @@
}
/**
- * Create an instance of {@link InitializerType }
+ * Create an instance of {@link OptionType }
*
*/
- public InitializerType createInitializerType() {
- return new InitializerType();
+ public OptionType createOptionType() {
+ return new OptionType();
}
/**
@@ -57,38 +57,46 @@
}
/**
- * Create an instance of {@link SqlInitializerType }
+ * Create an instance of {@link JbossIDMDeployerType }
*
*/
- public SqlInitializerType createSqlInitializerType() {
- return new SqlInitializerType();
+ public JbossIDMDeployerType createJbossIDMDeployerType() {
+ return new JbossIDMDeployerType();
}
/**
- * Create an instance of {@link HibernateInitializerType }
+ * Create an instance of {@link InitializerType }
*
*/
- public HibernateInitializerType createHibernateInitializerType() {
- return new HibernateInitializerType();
+ public InitializerType createInitializerType() {
+ return new InitializerType();
}
/**
- * Create an instance of {@link JbossIDMDeployerType }
+ * Create an instance of {@link HibernateDeployerType }
*
*/
- public JbossIDMDeployerType createJbossIDMDeployerType() {
- return new JbossIDMDeployerType();
+ public HibernateDeployerType createHibernateDeployerType() {
+ return new HibernateDeployerType();
}
/**
- * Create an instance of {@link OptionType }
+ * Create an instance of {@link SqlInitializerType }
*
*/
- public OptionType createOptionType() {
- return new OptionType();
+ public SqlInitializerType createSqlInitializerType() {
+ return new SqlInitializerType();
}
/**
+ * Create an instance of {@link HibernateInitializerType }
+ *
+ */
+ public HibernateInitializerType createHibernateInitializerType() {
+ return new HibernateInitializerType();
+ }
+
+ /**
* Create an instance of {@link JAXBElement }{@code <}{@link JbossIDMDeployerType
}{@code >}}
*
*/
Modified:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/OptionType.java
===================================================================
---
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/OptionType.java 2009-05-28
14:04:33 UTC (rev 539)
+++
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/OptionType.java 2009-05-28
17:17:16 UTC (rev 540)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.1-619
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.20 at 03:35:46 PM CST
+// Generated on: 2009.05.28 at 11:27:34 PM CST
//
Modified:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/OptionsType.java
===================================================================
---
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/OptionsType.java 2009-05-28
14:04:33 UTC (rev 539)
+++
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/OptionsType.java 2009-05-28
17:17:16 UTC (rev 540)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.1-619
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.20 at 03:35:46 PM CST
+// Generated on: 2009.05.28 at 11:27:34 PM CST
//
Modified:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/SqlInitializerType.java
===================================================================
---
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/SqlInitializerType.java 2009-05-28
14:04:33 UTC (rev 539)
+++
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/SqlInitializerType.java 2009-05-28
17:17:16 UTC (rev 540)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.1-619
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.20 at 03:35:46 PM CST
+// Generated on: 2009.05.28 at 11:27:34 PM CST
//
Modified:
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/package-info.java
===================================================================
---
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/package-info.java 2009-05-28
14:04:33 UTC (rev 539)
+++
idm/trunk/integration/deployer/src/main/java/org/jboss/identity/idm/integration/jboss5/jaxb2/package-info.java 2009-05-28
17:17:16 UTC (rev 540)
@@ -2,7 +2,7 @@
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
Implementation, vhudson-jaxb-ri-2.1-619
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/...
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.20 at 03:35:46 PM CST
+// Generated on: 2009.05.28 at 11:27:34 PM CST
//
@javax.xml.bind.annotation.XmlSchema(namespace =
"urn:jboss:identity:idm:deployer:v1_0_alpha", elementFormDefault =
javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
Modified:
idm/trunk/integration/deployer/src/main/resources/META-INF/default-jboss-idm.xml
===================================================================
---
idm/trunk/integration/deployer/src/main/resources/META-INF/default-jboss-idm.xml 2009-05-28
14:04:33 UTC (rev 539)
+++
idm/trunk/integration/deployer/src/main/resources/META-INF/default-jboss-idm.xml 2009-05-28
17:17:16 UTC (rev 540)
@@ -4,4 +4,8 @@
xsi:schemaLocation="urn:jboss:identity:idm:deployer:v1_0_alpha
identity-deployer.xsd">
<JNDIName>java:/IdentitySessionFactory</JNDIName>
<idmConfigFile>jboss.idm.cfg.xml</idmConfigFile>
+ <hibernateDeployer>
+ <hibernateConfiguration>jboss.idm.hibernate.cfg.xml</hibernateConfiguration>
+ <hibernateSessionFactoryJNDIName>java:/IDMHibernateSessionFactory</hibernateSessionFactoryJNDIName>
+ </hibernateDeployer>
</jboss-idm-deployer>
Modified: idm/trunk/integration/deployer/src/main/resources/identity-deployer.xsd
===================================================================
--- idm/trunk/integration/deployer/src/main/resources/identity-deployer.xsd 2009-05-28
14:04:33 UTC (rev 539)
+++ idm/trunk/integration/deployer/src/main/resources/identity-deployer.xsd 2009-05-28
17:17:16 UTC (rev 540)
@@ -10,7 +10,7 @@
<xs:sequence>
<xs:element name="JNDIName" type="xs:string" />
<xs:element name="idmConfigFile" type="xs:string" />
- <xs:element name="jmxObjectName" type="xs:string"/>
+ <xs:element name="hibernateDeployer" minOccurs="0"
type="urn:hibernateDeployerType"
xmlns:urn="urn:jboss:identity:idm:deployer:v1_0_alpha"/>
<xs:element name="initializers" minOccurs="0"
type="urn:initializerType"
xmlns:urn="urn:jboss:identity:idm:deployer:v1_0_alpha"/>
<xs:element name="options" minOccurs="0"
type="urn:optionsType"
xmlns:urn="urn:jboss:identity:idm:deployer:v1_0_alpha"/>
<xs:element name="depends" type="xs:string"
minOccurs="0" maxOccurs="unbounded" />
@@ -55,5 +55,15 @@
<xs:element type="xs:string" name="value"/>
</xs:sequence>
</xs:complexType>
+
+ <xs:complexType name="hibernateDeployerType">
+ <xs:sequence>
+ <xs:element type="xs:string"
name="hibernateConfiguration"/>
+ <xs:choice>
+ <xs:element type="xs:string"
name="hibernateSessionFactoryRegistryName" />
+ <xs:element type="xs:string"
name="hibernateSessionFactoryJNDIName" />
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
</xs:schema>
\ No newline at end of file
Modified: idm/trunk/integration/deployer/src/main/resources/jboss.idm.cfg.xml
===================================================================
--- idm/trunk/integration/deployer/src/main/resources/jboss.idm.cfg.xml 2009-05-28
14:04:33 UTC (rev 539)
+++ idm/trunk/integration/deployer/src/main/resources/jboss.idm.cfg.xml 2009-05-28
17:17:16 UTC (rev 540)
@@ -89,8 +89,8 @@
</supported-identity-object-types>
<options>
<option>
- <name>hibernateConfiguration</name>
- <value>jboss.idm.hibernate.cfg.xml</value>
+ <name>hibernateSessionFactoryJNDIName</name>
+ <value>java:/IDMHibernateSessionFactory</value>
</option>
<option>
<name>populateRelationshipTypes</name>
Added:
idm/trunk/integration/deployer/src/test/resources/jbpm.identity/META-INF/jbpm-jboss-idm.xml
===================================================================
---
idm/trunk/integration/deployer/src/test/resources/jbpm.identity/META-INF/jbpm-jboss-idm.xml
(rev 0)
+++
idm/trunk/integration/deployer/src/test/resources/jbpm.identity/META-INF/jbpm-jboss-idm.xml 2009-05-28
17:17:16 UTC (rev 540)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-idm-deployer xmlns="urn:jboss:identity:idm:deployer:v1_0_alpha"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:identity:idm:deployer:v1_0_alpha
identity-deployer.xsd">
+ <JNDIName>java:/jbpmIdentitySessionFactory</JNDIName>
+ <idmConfigFile>jbpm.idm.cfg.xml</idmConfigFile>
+</jboss-idm-deployer>
Added: idm/trunk/integration/deployer/src/test/resources/jbpm.identity/jbpm.idm.cfg.xml
===================================================================
--- idm/trunk/integration/deployer/src/test/resources/jbpm.identity/jbpm.idm.cfg.xml
(rev 0)
+++
idm/trunk/integration/deployer/src/test/resources/jbpm.identity/jbpm.idm.cfg.xml 2009-05-28
17:17:16 UTC (rev 540)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-identity xmlns="urn:jboss:identity:idm:config:v1_0_alpha"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_alpha
identity-config.xsd">
+ <realms>
+ <realm>
+ <id>realm://jbpmIdentity</id>
+ <repository-id-ref>jbpm_Identity_Repository</repository-id-ref>
+ <identity-type-mappings>
+ <user-mapping>USER</user-mapping>
+ </identity-type-mappings>
+ </realm>
+ </realms>
+ <repositories>
+ <repository>
+ <id>jbpm_Identity_Repository</id>
+
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
+ <external-config/>
+
<default-identity-store-id>jbpm_Identity_DB_Store</default-identity-store-id>
+
<default-attribute-store-id>jbpm_Identity_DB_Store</default-attribute-store-id>
+ </repository>
+ </repositories>
+ <stores>
+ <attribute-stores/>
+ <identity-stores>
+ <identity-store>
+ <id>jbpm_Identity_DB_Store</id>
+
<class>org.jboss.identity.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
+ <external-config/>
+ <supported-relationship-types>
+
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
+ <relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
+ </supported-relationship-types>
+ <supported-identity-object-types>
+ <identity-object-type>
+ <name>USER</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+
<identity-object-type-ref>unit</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials>
+ <credential-type>PASSWORD</credential-type>
+ </credentials>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>unit</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>unit</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ </supported-identity-object-types>
+ <options>
+ <option>
+ <name>hibernateSessionFactoryJNDIName</name>
+ <value>java:/IDMHibernateSessionFactory</value>
+ </option>
+ <option>
+ <name>populateRelationshipTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>populateIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>isRealmAware</name>
+ <value>true</value>
+ </option>
+ </options>
+ </identity-store>
+ </identity-stores>
+ </stores>
+</jboss-identity>