Author: jeff.yuchang
Date: 2009-05-21 04:56:05 -0400 (Thu, 21 May 2009)
New Revision: 502
Added:
idm/trunk/integration/jboss5/src/main/resources/idm-service-assembly.xml
idm/trunk/integration/jboss5/src/main/resources/jboss.idm.cfg.xml
Removed:
idm/trunk/integration/jboss5/src/main/resources/assembly.xml
idm/trunk/integration/jboss5/src/main/resources/jboss-idm.xml
Modified:
idm/trunk/integration/jboss5/pom.xml
idm/trunk/integration/jboss5/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMService.java
idm/trunk/integration/jboss5/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMServiceMBean.java
idm/trunk/integration/jboss5/src/main/resources/META-INF/idm-service-jboss-beans.xml
idm/trunk/parent/pom.xml
Log:
Rename the file.
Modified: idm/trunk/integration/jboss5/pom.xml
===================================================================
--- idm/trunk/integration/jboss5/pom.xml 2009-05-20 10:20:47 UTC (rev 501)
+++ idm/trunk/integration/jboss5/pom.xml 2009-05-21 08:56:05 UTC (rev 502)
@@ -147,11 +147,9 @@
</goals>
<configuration>
<finalName>idm-service.sar</finalName>
-
-
<appendAssemblyId>true</appendAssemblyId>
<descriptors>
-
<descriptor>src/main/resources/assembly.xml</descriptor>
+
<descriptor>src/main/resources/idm-service-assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
Modified:
idm/trunk/integration/jboss5/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMService.java
===================================================================
---
idm/trunk/integration/jboss5/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMService.java 2009-05-20
10:20:47 UTC (rev 501)
+++
idm/trunk/integration/jboss5/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMService.java 2009-05-21
08:56:05 UTC (rev 502)
@@ -6,47 +6,49 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.lang.reflect.Method;
import java.net.URL;
import java.sql.Connection;
+import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
-import java.sql.DatabaseMetaData;
+import java.util.Collection;
import java.util.Iterator;
-import java.util.Collection;
-import java.lang.reflect.Method;
-import java.security.acl.Group;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.management.MBeanServer;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import javax.transaction.TransactionManager;
-import org.jboss.aop.microcontainer.aspects.jmx.JMX;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.AnnotationConfiguration;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.Environment;
+import org.hibernate.dialect.DialectFactory;
+import org.hibernate.exception.SQLGrammarException;
+import org.hibernate.metadata.ClassMetadata;
+import org.hibernate.tool.hbm2ddl.SchemaExport;
+import org.hibernate.tool.hbm2ddl.SchemaUpdate;
import org.jboss.identity.idm.api.IdentitySessionFactory;
import org.jboss.identity.idm.api.cfg.IdentityConfiguration;
-import org.jboss.identity.idm.impl.configuration.IdentityConfigurationImpl;
+import org.jboss.identity.idm.common.exception.IdentityException;
import org.jboss.identity.idm.common.transaction.TransactionManagerProvider;
import org.jboss.identity.idm.common.transaction.Transactions;
-import org.jboss.portal.common.util.LoaderResource;
-import org.jboss.portal.common.util.CLResourceLoader;
+import org.jboss.identity.idm.impl.configuration.IdentityConfigurationImpl;
+import org.jboss.mx.util.ObjectNameFactory;
import org.jboss.portal.common.io.IOTools;
import org.jboss.portal.common.net.URLTools;
-import org.hibernate.Session;
-import org.hibernate.Query;
-import org.hibernate.SessionFactory;
-import org.hibernate.HibernateException;
-import org.hibernate.dialect.DialectFactory;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.cfg.AnnotationConfiguration;
-import org.hibernate.cfg.Environment;
-import org.hibernate.tool.hbm2ddl.SchemaExport;
-import org.hibernate.tool.hbm2ddl.SchemaUpdate;
-import org.hibernate.exception.SQLGrammarException;
-import org.hibernate.metadata.ClassMetadata;
-import org.apache.log4j.Logger;
+import org.jboss.portal.common.util.CLResourceLoader;
+import org.jboss.portal.common.util.LoaderResource;
+
+import bsh.EvalError;
import bsh.Interpreter;
-import bsh.EvalError;
/**
@@ -56,7 +58,7 @@
* @author Boleslaw Dawidowicz
* @author Julien Viet
*/
-(a)JMX(exposedInterface=IDMServiceMBean.class,
name="jboss.identity:service=IDMService")
+
public class IDMService implements IDMServiceMBean {
public final static String DEFAULT_JNDI = "java:/IdentitySessionFactory";
@@ -103,15 +105,20 @@
private String exitSQL;
private String datasource;
+
+ private String objectName;
+
+ private MBeanServer mbeanServer;
/** The hibernate configuration object. */
protected Configuration config;
-
- public IDMService(String idmConfigFile) {
+ public IDMService(String idmConfigFile, MBeanServer mbeanServer) {
this.idmConfigFile = idmConfigFile;
+ this.mbeanServer = mbeanServer;
this.idmSessionFactoryJNDI = DEFAULT_JNDI;
+ this.objectName = IDMServiceMBean.defaultObjectName;
}
public String getIdmConfigFile() {
@@ -183,73 +190,30 @@
{
this.hibernateSessionFactoryJNDIName = hibernateSessionFactoryJNDIName;
}
+
+
+ public String getObjectName() {
+ return objectName;
+ }
+ public void setObjectName(String objectName) {
+ this.objectName = objectName;
+ }
+
public void start() throws Exception {
logger.info("Starting the JBoss Identity Management Service");
- if (needToInitializeDB()) {
- initializeDB();
+ if (needToInitializeDBFromScript()) {
+ initializeDBFromScript();
}
InitialContext context = new InitialContext();
- int check = RESULT_NONE;
-
final IdentityConfiguration identityConfiguration = new
IdentityConfigurationImpl().configure(getIdmConfigFile());
// If hibernate config is present than create SessionFactory manually and register
it into identity config
if (hibernateConfigLocation != null)
{
- URL configURL =
Thread.currentThread().getContextClassLoader().getResource(hibernateConfigLocation);
- if (configURL == null)
- {
- throw new Exception("The config " + hibernateConfigLocation +
" does not exist");
- }
-
- if (!URLTools.exists(configURL))
- {
- throw new Exception("The config " + configURL + " does not
exist");
- }
-
- config = new AnnotationConfiguration().configure(configURL);
-
- createHibernateSessionFactory();
-
- if (getHibernateSessionFactoryJNDIName() != null)
- {
- try
- {
- context.bind(getHibernateSessionFactoryJNDIName(),
hibernateSessionFactory);
- }
- catch (NamingException e)
- {
- e.printStackTrace(); //To change body of catch statement use File |
Settings | File Templates.
- }
- }
-
- if (getHibernateSessionFactoryRegistryName() != null)
- {
- identityConfiguration.getIdentityConfigurationRegistry().
- register(hibernateSessionFactory,
getHibernateSessionFactoryRegistryName());
- }
-
- if (doChecking)
- {
- //check the schema
- check = doCheck();
- switch (check)
- {
- case RESULT_NONE:
- break;
- case RESULT_UPDATE:
- updateSchema();
- break;
- case RESULT_CREATE:
- createSchema();
- createContent();
-
- break;
- }
- }
+ initializeDBFromHibernateConfiguration(context, identityConfiguration);
}
try {
@@ -268,11 +232,71 @@
}
context.bind(getIdmSessionFactoryJNDI(), identitySessionFactory);
- logger.info("Started the JBoss Identity Management Service");
+ mbeanServer.registerMBean(this, ObjectNameFactory.create(getObjectName()));
+
+ logger.info("Started the JBoss Identity Management Service");
}
+
+ private void initializeDBFromHibernateConfiguration(InitialContext context,
+ final IdentityConfiguration identityConfiguration) throws Exception,
IdentityException {
+
+ int check = RESULT_NONE;
+ URL configURL =
Thread.currentThread().getContextClassLoader().getResource(hibernateConfigLocation);
+ if (configURL == null)
+ {
+ throw new Exception("The config " + hibernateConfigLocation + " does
not exist");
+ }
+ if (!URLTools.exists(configURL))
+ {
+ throw new Exception("The config " + configURL + " does not
exist");
+ }
+ config = new AnnotationConfiguration().configure(configURL);
+
+ createHibernateSessionFactory();
+
+ if (getHibernateSessionFactoryJNDIName() != null)
+ {
+ try
+ {
+ context.bind(getHibernateSessionFactoryJNDIName(), hibernateSessionFactory);
+ }
+ catch (NamingException e)
+ {
+ e.printStackTrace(); //To change body of catch statement use File | Settings |
File Templates.
+ }
+ }
+
+ if (getHibernateSessionFactoryRegistryName() != null)
+ {
+ identityConfiguration.getIdentityConfigurationRegistry().
+ register(hibernateSessionFactory, getHibernateSessionFactoryRegistryName());
+ }
+
+ if (doChecking)
+ {
+ //check the schema
+ check = doCheck();
+ switch (check)
+ {
+ case RESULT_NONE:
+ break;
+ case RESULT_UPDATE:
+ updateSchema();
+ break;
+ case RESULT_CREATE:
+ createSchema();
+ createContent();
+
+ break;
+ }
+ }
+}
+
+
+
public void stop() throws Exception {
logger.info("Stopping the JBoss Identity Management Service");
}
@@ -294,7 +318,8 @@
}
catch (Exception e)
{
- logger.info(e); //To change body of catch statement use File | Settings | File
Templates.
+ logger.severe(e.getMessage());
+ e.printStackTrace();
}
if (hibernateSessionFactory != null)
@@ -311,11 +336,13 @@
}
catch (Exception e)
{
- e.printStackTrace(); //To change body of catch statement use File | Settings
| File Templates.
+ logger.severe(e.getMessage());
+ e.printStackTrace();
}
}
-
- logger.info("Stopped the JBoss Identity Management Service");
+
+ mbeanServer.unregisterMBean(ObjectNameFactory.create(getObjectName()));
+ logger.info("Stopped the JBoss Identity Management Service");
}
@@ -337,7 +364,7 @@
}
- private boolean needToInitializeDB() {
+ private boolean needToInitializeDBFromScript() {
if (this.getDatasource() != null &&
this.getSQLScript() != null &&
this.getExitSQL() != null) {
@@ -347,7 +374,7 @@
}
- private void initializeDB() throws Exception {
+ private void initializeDBFromScript() throws Exception {
DataSource ds = (DataSource)new InitialContext().lookup(datasource);
Connection conn = ds.getConnection();
boolean load = false;
@@ -448,7 +475,7 @@
if (dialectName == null)
{
String dataSourceJNDI = config.getProperty(Environment.DATASOURCE);
- logger.debug("Detecting dialect with datasource " + dataSourceJNDI +
" ...");
+ logger.fine("Detecting dialect with datasource " + dataSourceJNDI +
" ...");
DataSource ds = (DataSource)new InitialContext().lookup(dataSourceJNDI);
Connection conn = null;
try
@@ -459,14 +486,14 @@
int databaseMajorVersion = getDatabaseMajorVersion(meta);
dialectName = DialectFactory.determineDialect(databaseName,
databaseMajorVersion).getClass().getName();
config.setProperty(Environment.DIALECT, dialectName);
- logger.debug("Detected dialect " + dialectName + ", database
is (" + databaseName + "," + databaseMajorVersion + ")");
+ logger.fine("Detected dialect " + dialectName + ", database is
(" + databaseName + "," + databaseMajorVersion + ")");
}
finally
{
IOTools.safeClose(conn);
}
}
- logger.debug("Using dialect " + dialectName);
+ logger.fine("Using dialect " + dialectName);
if ("org.hibernate.dialect.HSQLDialect".equals(dialectName))
{
logger.info("You are using the file based HSQL database, this is not
recommended on a production environment and will not work properly on a clustered
environment.");
@@ -488,7 +515,7 @@
}
}
- public int doCheck()
+ private int doCheck()
{
Session session = null;
int numOfChecks = 0;
@@ -522,14 +549,14 @@
// There was no sql grammar exception - schema is ok!
if (bad == 0)
{
- logger.debug("The schema was checked as valid");
+ logger.fine("The schema was checked as valid");
//do nothing
return RESULT_NONE;
}
// There is no existing valid schema;
else if (bad == numOfChecks)
{
- logger.debug("The schema was checked as not exists");
+ logger.fine("The schema was checked as not exists");
// Totaly invalid schema
return RESULT_CREATE;
}
@@ -537,19 +564,19 @@
else if (bad < numOfChecks)
{
// Schema needs updates;
- logger.debug("The schema was checked as need updates");
+ logger.fine("The schema was checked as need updates");
return RESULT_UPDATE;
}
// If here something gone wrong...
- logger.debug("The schema was checked as need to be created");
+ logger.fine("The schema was checked as need to be created");
return RESULT_CREATE;
}
- public void createSchema()
+ private void createSchema()
{
- logger.debug("Creating database schema");
+ logger.fine("Creating database schema");
try
{
SchemaExport export = new SchemaExport(config);
@@ -557,13 +584,13 @@
}
catch (Exception e)
{
- logger.debug("Cannot create schema: ", e);
+ logger.log(Level.SEVERE, "Cannot create schema:" , e);
}
}
- public void destroySchema()
+ private void destroySchema()
{
- logger.debug("Destroying database schema");
+ logger.fine("Destroying database schema");
try
{
SchemaExport export = new SchemaExport(config);
@@ -571,11 +598,11 @@
}
catch (Exception e)
{
- logger.debug("Cannot destroy schema:", e);
+ logger.log(Level.SEVERE, "Cannot destroy schema:", e);
}
}
- public void createContent()
+ private void createContent()
{
LoaderResource setupResource = null;
@@ -613,15 +640,15 @@
}
catch (EvalError e)
{
- logger.info("Error in the bsh script:", e);
+ logger.log(Level.SEVERE, "Error in the bsh script:", e);
}
catch (IllegalStateException e)
{
- logger.info("Cannot load setup script:", e);
+ logger.log(Level.SEVERE, "Error in the bsh script:", e);
}
catch (Exception e)
{
- logger.info("Error in bsh script execution:", e);
+ logger.log(Level.SEVERE, "Error in the bsh script:", e);
}
}
else
@@ -632,8 +659,7 @@
}
-
- public void updateSchema()
+ private void updateSchema()
{
logger.info("Updating database schema");
SchemaUpdate update = new SchemaUpdate(config);
Modified:
idm/trunk/integration/jboss5/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMServiceMBean.java
===================================================================
---
idm/trunk/integration/jboss5/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMServiceMBean.java 2009-05-20
10:20:47 UTC (rev 501)
+++
idm/trunk/integration/jboss5/src/main/java/org/jboss/identity/idm/integration/jboss5/IDMServiceMBean.java 2009-05-21
08:56:05 UTC (rev 502)
@@ -5,6 +5,7 @@
+
/**
*
* Interface for exposing JMX operations.
@@ -14,6 +15,8 @@
*/
public interface IDMServiceMBean {
+ String defaultObjectName = "org.jboss.identity.idm:service=IDMService";
+
String getIdmConfigFile() ;
String getIdmSessionFactoryJNDI();
@@ -23,5 +26,15 @@
String getSQLScript();
String getExitSQL();
+
+ String getObjectName();
+
+ String getSetupLocation();
+
+ boolean isDoChecking();
+
+ String getHibernateConfigLocation();
+
+ String getHibernateSessionFactoryRegistryName();
}
Modified:
idm/trunk/integration/jboss5/src/main/resources/META-INF/idm-service-jboss-beans.xml
===================================================================
---
idm/trunk/integration/jboss5/src/main/resources/META-INF/idm-service-jboss-beans.xml 2009-05-20
10:20:47 UTC (rev 501)
+++
idm/trunk/integration/jboss5/src/main/resources/META-INF/idm-service-jboss-beans.xml 2009-05-21
08:56:05 UTC (rev 502)
@@ -8,7 +8,8 @@
<bean name="jboss.identity.IDMService"
class="org.jboss.identity.idm.integration.jboss5.IDMService">
<constructor>
- <parameter>jboss-idm.xml</parameter>
+ <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.hsql.create.sql</property>
Deleted: idm/trunk/integration/jboss5/src/main/resources/assembly.xml
===================================================================
--- idm/trunk/integration/jboss5/src/main/resources/assembly.xml 2009-05-20 10:20:47 UTC
(rev 501)
+++ idm/trunk/integration/jboss5/src/main/resources/assembly.xml 2009-05-21 08:56:05 UTC
(rev 502)
@@ -1,36 +0,0 @@
-<assembly
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
- <id>config</id>
- <formats>
- <format>zip</format>
- </formats>
- <includeBaseDirectory>true</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>${project.build.outputDirectory}</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>META-INF/*.xml</include>
- <include>jboss-idm.xml</include>
- <include>jboss.idm.hibernate.cfg.xml</include>
- </includes>
- </fileSet>
- </fileSets>
-
- <dependencySets>
- <dependencySet>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>org.jboss.identity.integration:idm-jboss5</include>
- <include>org.jboss.identity:idm-cache</include>
- <include>org.jboss.identity:idm-ldap</include>
- <include>org.jboss.identity:idm-hibernate</include>
- <include>org.jboss.identity:idm-core</include>
- <include>org.jboss.identity:idm-api</include>
- <include>org.jboss.identity:idm-common</include>
- <include>org.jboss.identity:idm-spi</include>
- </includes>
- </dependencySet>
- </dependencySets>
-
-</assembly>
Copied: idm/trunk/integration/jboss5/src/main/resources/idm-service-assembly.xml (from rev
501, idm/trunk/integration/jboss5/src/main/resources/assembly.xml)
===================================================================
--- idm/trunk/integration/jboss5/src/main/resources/idm-service-assembly.xml
(rev 0)
+++ idm/trunk/integration/jboss5/src/main/resources/idm-service-assembly.xml 2009-05-21
08:56:05 UTC (rev 502)
@@ -0,0 +1,36 @@
+<assembly
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+ <id>config</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${project.build.outputDirectory}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>META-INF/*.xml</include>
+ <include>jboss.idm.cfg.xml</include>
+ <include>jboss.idm.hibernate.cfg.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+
<include>org.jboss.identity.idm.integration:idm-jboss5</include>
+ <include>org.jboss.identity.idm:idm-cache</include>
+ <include>org.jboss.identity.idm:idm-ldap</include>
+ <include>org.jboss.identity.idm:idm-hibernate</include>
+ <include>org.jboss.identity.idm:idm-core</include>
+ <include>org.jboss.identity.idm:idm-api</include>
+ <include>org.jboss.identity.idm:idm-common</include>
+ <include>org.jboss.identity.idm:idm-spi</include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
+
+</assembly>
Property changes on:
idm/trunk/integration/jboss5/src/main/resources/idm-service-assembly.xml
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: idm/trunk/integration/jboss5/src/main/resources/jboss-idm.xml
===================================================================
--- idm/trunk/integration/jboss5/src/main/resources/jboss-idm.xml 2009-05-20 10:20:47 UTC
(rev 501)
+++ idm/trunk/integration/jboss5/src/main/resources/jboss-idm.xml 2009-05-21 08:56:05 UTC
(rev 502)
@@ -1,115 +0,0 @@
-<?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://JBossIdentity</id>
- <repository-id-ref>JBoss_Identity_Repository</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- </realms>
- <repositories>
- <repository>
- <id>JBoss_Identity_Repository</id>
-
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
- <external-config/>
-
<default-identity-store-id>Identity_DB_Store</default-identity-store-id>
-
<default-attribute-store-id>Identity_DB_Store</default-attribute-store-id>
- </repository>
- </repositories>
- <stores>
- <attribute-stores/>
- <identity-stores>
- <identity-store>
- <id>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>GROUP</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials>
- <credential-type>PASSWORD</credential-type>
- </credentials>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>ORGANIZATION</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>GROUP</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>GROUP</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>GROUP</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- </supported-identity-object-types>
- <options>
- <option>
- <name>hibernateConfiguration</name>
- <value>jboss.idm.hibernate.cfg.xml</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>
Copied: idm/trunk/integration/jboss5/src/main/resources/jboss.idm.cfg.xml (from rev 501,
idm/trunk/integration/jboss5/src/main/resources/jboss-idm.xml)
===================================================================
--- idm/trunk/integration/jboss5/src/main/resources/jboss.idm.cfg.xml
(rev 0)
+++ idm/trunk/integration/jboss5/src/main/resources/jboss.idm.cfg.xml 2009-05-21 08:56:05
UTC (rev 502)
@@ -0,0 +1,115 @@
+<?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://JBossIdentity</id>
+ <repository-id-ref>JBoss_Identity_Repository</repository-id-ref>
+ <identity-type-mappings>
+ <user-mapping>USER</user-mapping>
+ </identity-type-mappings>
+ </realm>
+ </realms>
+ <repositories>
+ <repository>
+ <id>JBoss_Identity_Repository</id>
+
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
+ <external-config/>
+
<default-identity-store-id>Identity_DB_Store</default-identity-store-id>
+
<default-attribute-store-id>Identity_DB_Store</default-attribute-store-id>
+ </repository>
+ </repositories>
+ <stores>
+ <attribute-stores/>
+ <identity-stores>
+ <identity-store>
+ <id>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>GROUP</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials>
+ <credential-type>PASSWORD</credential-type>
+ </credentials>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>ORGANIZATION</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>GROUP</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>GROUP</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>GROUP</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ </supported-identity-object-types>
+ <options>
+ <option>
+ <name>hibernateConfiguration</name>
+ <value>jboss.idm.hibernate.cfg.xml</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>
Property changes on: idm/trunk/integration/jboss5/src/main/resources/jboss.idm.cfg.xml
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: idm/trunk/parent/pom.xml
===================================================================
--- idm/trunk/parent/pom.xml 2009-05-20 10:20:47 UTC (rev 501)
+++ idm/trunk/parent/pom.xml 2009-05-21 08:56:05 UTC (rev 502)
@@ -1,9 +1,4 @@
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-parent</artifactId>
- <version>3</version>
- </parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.identity.idm</groupId>
<artifactId>idm-parent</artifactId>