[gatein-commits] gatein SVN: r2049 - in portal/trunk: component/identity/src/main/java/conf/portal and 7 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Mar 9 03:01:30 EST 2010


Author: bdaw
Date: 2010-03-09 03:01:28 -0500 (Tue, 09 Mar 2010)
New Revision: 2049

Added:
   portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheService.java
   portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheServiceImpl.java
   portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml
Removed:
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/jboss-cache.xml
Modified:
   portal/trunk/component/identity/src/main/java/conf/portal/idm-config.xml
   portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMServiceImpl.java
   portal/trunk/component/identity/src/test/java/conf/portal/idm-configuration.xml
   portal/trunk/component/test/organization/src/main/resources/conf/exo.portal.component.test.organization-configuration.xml
   portal/trunk/component/test/organization/src/main/resources/conf/picketlink-idm-config.xml
   portal/trunk/pom.xml
   portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
   portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-acme-config.xml
   portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-config.xml
   portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-msad-config.xml
   portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-msad-readonly-config.xml
   portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml
Log:
- use PLIDM realm templating
- Simple service for identity cache invalidation

Modified: portal/trunk/component/identity/src/main/java/conf/portal/idm-config.xml
===================================================================
--- portal/trunk/component/identity/src/main/java/conf/portal/idm-config.xml	2010-03-09 07:39:21 UTC (rev 2048)
+++ portal/trunk/component/identity/src/main/java/conf/portal/idm-config.xml	2010-03-09 08:01:28 UTC (rev 2049)
@@ -25,7 +25,7 @@
                 xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_ga identity-config.xsd">
     <realms>
         <realm>
-            <id>PortalRealm</id>
+            <id>idm_realm</id>
             <repository-id-ref>PortalRepository</repository-id-ref>
             <identity-type-mappings>
                 <user-mapping>USER</user-mapping>

Added: portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheService.java
===================================================================
--- portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheService.java	                        (rev 0)
+++ portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheService.java	2010-03-09 08:01:28 UTC (rev 2049)
@@ -0,0 +1,42 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2010, 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.exoplatform.services.organization.idm;
+
+import org.picketlink.idm.cache.APICacheProvider;
+
+
+/*
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
+ */
+public interface IdentityCacheService
+{
+
+   public void register(APICacheProvider cacheProvider);
+
+   public void invalidate(String namespace);
+
+   public void invalidateAll();
+
+
+
+}

Added: portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheServiceImpl.java
===================================================================
--- portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheServiceImpl.java	                        (rev 0)
+++ portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IdentityCacheServiceImpl.java	2010-03-09 08:01:28 UTC (rev 2049)
@@ -0,0 +1,68 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2010, 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.exoplatform.services.organization.idm;
+
+import org.picketlink.idm.cache.APICacheProvider;
+
+import java.util.LinkedList;
+import java.util.List;
+
+
+/*
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
+ */
+public class IdentityCacheServiceImpl implements IdentityCacheService
+{
+
+   private final List<APICacheProvider> cacheProviders = new LinkedList<APICacheProvider>();
+
+   public IdentityCacheServiceImpl()
+   {
+   }
+
+   public void register(APICacheProvider cacheProvider)
+   {
+
+      if (cacheProvider != null)
+      {
+         cacheProviders.add(cacheProvider);
+      }
+
+   }
+
+   public void invalidate(String namespace)
+   {
+      for (APICacheProvider cacheProvider : cacheProviders)
+      {
+         cacheProvider.invalidate(namespace);
+      }
+   }
+
+   public void invalidateAll()
+   {
+      for (APICacheProvider cacheProvider : cacheProviders)
+      {
+         cacheProvider.invalidateAll();
+      }
+   }
+}

Modified: portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMServiceImpl.java
===================================================================
--- portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMServiceImpl.java	2010-03-09 07:39:21 UTC (rev 2048)
+++ portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMServiceImpl.java	2010-03-09 08:01:28 UTC (rev 2049)
@@ -29,12 +29,15 @@
 import org.picketlink.idm.api.IdentitySession;
 import org.picketlink.idm.api.IdentitySessionFactory;
 import org.picketlink.idm.api.cfg.IdentityConfiguration;
+import org.picketlink.idm.cache.APICacheProvider;
 import org.picketlink.idm.common.exception.IdentityConfigurationException;
+import org.picketlink.idm.impl.cache.JBossCacheAPICacheProviderImpl;
 import org.picketlink.idm.impl.configuration.IdentityConfigurationImpl;
 import org.picketlink.idm.impl.configuration.jaxb2.JAXB2IdentityConfiguration;
 import org.picketlink.idm.spi.configuration.metadata.IdentityConfigurationMetaData;
 import org.picocontainer.Startable;
 
+import java.io.InputStream;
 import java.net.URL;
 
 import javax.naming.InitialContext;
@@ -59,14 +62,16 @@
 
    public static final String REALM_NAME_OPTION = "portalRealm";
 
-   // We may have several portal containers thus we need one indentitySessionFactory per portal container
-   //   private static IdentitySessionFactory identitySessionFactory;
+   public static final String CACHE_CONFIG_OPTION = "cacheConfig";
+
    private IdentitySessionFactory identitySessionFactory;
 
    private String config;
 
-   private String realmName = "PortalRealm";
+   private String realmName = "idm_realm";
 
+   private String cacheConfig;
+
    private IdentityConfiguration identityConfiguration;
 
    private PicketLinkIDMServiceImpl()
@@ -77,11 +82,13 @@
       InitParams initParams,
       HibernateService hibernateService,
       ConfigurationManager confManager,
+      IdentityCacheService identityCache,
       InitialContextInitializer dependency) throws Exception
    {
       ValueParam config = initParams.getValueParam(PARAM_CONFIG_OPTION);
       ValueParam jndiName = initParams.getValueParam(PARAM_JNDI_NAME_OPTION);
       ValueParam realmName = initParams.getValueParam(REALM_NAME_OPTION);
+      ValueParam cacheConfig = initParams.getValueParam(CACHE_CONFIG_OPTION);
 
       if (config == null && jndiName == null)
       {
@@ -103,12 +110,23 @@
             throw new IllegalStateException("Cannot fine resource: " + this.config);
          }
 
+
+
          IdentityConfigurationMetaData configMD =
             JAXB2IdentityConfiguration.createConfigurationMetaData(confManager.getInputStream(this.config));
 
          identityConfiguration = new IdentityConfigurationImpl().configure(configMD);
 
          identityConfiguration.getIdentityConfigurationRegistry().register(hibernateService.getSessionFactory(), "hibernateSessionFactory");
+
+         if (cacheConfig != null)
+         {
+            InputStream configStream = confManager.getInputStream(cacheConfig.getValue());
+            JBossCacheAPICacheProviderImpl cacheProvider = new JBossCacheAPICacheProviderImpl();
+            cacheProvider.initialize(configStream);
+            identityCache.register(cacheProvider);
+            identityConfiguration.getIdentityConfigurationRegistry().register(cacheProvider, "apiCacheProvider");
+         }
       }
       else
       {

Modified: portal/trunk/component/identity/src/test/java/conf/portal/idm-configuration.xml
===================================================================
--- portal/trunk/component/identity/src/test/java/conf/portal/idm-configuration.xml	2010-03-09 07:39:21 UTC (rev 2048)
+++ portal/trunk/component/identity/src/test/java/conf/portal/idm-configuration.xml	2010-03-09 08:01:28 UTC (rev 2049)
@@ -25,6 +25,11 @@
                xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
   <component>
+    <key>org.exoplatform.services.organization.idm.IdentityCacheService</key>
+    <type>org.exoplatform.services.organization.idm.IdentityCacheServiceImpl</type>
+  </component> 
+
+  <component>
     <key>org.exoplatform.services.organization.idm.PicketLinkIDMService</key>
     <type>org.exoplatform.services.organization.idm.PicketLinkIDMServiceImpl</type>
     <init-params>

Modified: portal/trunk/component/test/organization/src/main/resources/conf/exo.portal.component.test.organization-configuration.xml
===================================================================
--- portal/trunk/component/test/organization/src/main/resources/conf/exo.portal.component.test.organization-configuration.xml	2010-03-09 07:39:21 UTC (rev 2048)
+++ portal/trunk/component/test/organization/src/main/resources/conf/exo.portal.component.test.organization-configuration.xml	2010-03-09 08:01:28 UTC (rev 2049)
@@ -25,6 +25,10 @@
                xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
 
+   <component>
+     <key>org.exoplatform.services.organization.idm.IdentityCacheService</key>
+     <type>org.exoplatform.services.organization.idm.IdentityCacheServiceImpl</type>
+   </component> 
 
    <component>
       <key>org.exoplatform.services.organization.idm.PicketLinkIDMService</key>

Modified: portal/trunk/component/test/organization/src/main/resources/conf/picketlink-idm-config.xml
===================================================================
--- portal/trunk/component/test/organization/src/main/resources/conf/picketlink-idm-config.xml	2010-03-09 07:39:21 UTC (rev 2048)
+++ portal/trunk/component/test/organization/src/main/resources/conf/picketlink-idm-config.xml	2010-03-09 08:01:28 UTC (rev 2049)
@@ -25,7 +25,7 @@
                 xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_ga identity-config.xsd">
     <realms>
         <realm>
-            <id>PortalRealm</id>
+            <id>idm_realm</id>
             <repository-id-ref>PortalRepository</repository-id-ref>
             <identity-type-mappings>
                 <user-mapping>USER</user-mapping>

Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml	2010-03-09 07:39:21 UTC (rev 2048)
+++ portal/trunk/pom.xml	2010-03-09 08:01:28 UTC (rev 2049)
@@ -46,7 +46,7 @@
       <org.gatein.common.version>2.0.0-CR03</org.gatein.common.version>
       <org.gatein.wci.version>2.0.0-CR02</org.gatein.wci.version>
       <org.gatein.pc.version>2.1.0-CR05</org.gatein.pc.version>
-      <org.picketlink.idm>1.1.0.Beta8</org.picketlink.idm>
+      <org.picketlink.idm>1.1.0.Beta9</org.picketlink.idm>
       <org.gatein.wsrp.version>1.0.0-Beta09</org.gatein.wsrp.version>
       <org.gatein.mop.version>1.0.0-CR03</org.gatein.mop.version>
       <org.slf4j.version>1.5.6</org.slf4j.version>

Deleted: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/jboss-cache.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/jboss-cache.xml	2010-03-09 07:39:21 UTC (rev 2048)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/jboss-cache.xml	2010-03-09 08:01:28 UTC (rev 2049)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xmlns="urn:jboss:jbosscache-core:config:3.0">
-
-</jbosscache>

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml	2010-03-09 07:39:21 UTC (rev 2048)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml	2010-03-09 08:01:28 UTC (rev 2049)
@@ -23,9 +23,14 @@
 <configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
                xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-   
 
+
   <component>
+    <key>org.exoplatform.services.organization.idm.IdentityCacheService</key>
+    <type>org.exoplatform.services.organization.idm.IdentityCacheServiceImpl</type>
+  </component>
+
+  <component>
     <key>org.exoplatform.services.database.HibernateService</key>
     <jmx-name>database:type=HibernateService</jmx-name>
     <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
@@ -70,11 +75,19 @@
         <!--<value>war:/conf/organization/picketlink-idm/examples/picketlink-idm-msad-readonly-config.xml</value>-->
         
       </value-param>
+
+      <!-- In default PicketLink IDM configuration hibernate store will namespace identity objects using this realm name
+           if you want to share DB between portal and also share the same identity data remove the "${container.name.suffix}" part-->
       <value-param>
         <name>portalRealm</name>
-        <value>realm${container.name.suffix}</value>
+        <value>idm_realm${container.name.suffix}</value>
       </value-param>
 
+      <value-param>
+        <name>cacheConfig</name>
+        <value>war:/conf/organization/picketlink-idm/jboss-cache.xml</value>
+      </value-param>
+
     </init-params>
   </component>
 

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-acme-config.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-acme-config.xml	2010-03-09 07:39:21 UTC (rev 2048)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-acme-config.xml	2010-03-09 08:01:28 UTC (rev 2049)
@@ -25,26 +25,35 @@
                 xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_ga identity-config.xsd">
   <realms>
     <realm>
-      <id>realm</id>
-      <repository-id-ref>PortalRepository</repository-id-ref>
+      <id>idm_realm</id>
+      <repository-id-ref>DefaultPortalRepository</repository-id-ref>
       <identity-type-mappings>
         <user-mapping>USER</user-mapping>
       </identity-type-mappings>
+      <options>
+        <option>
+          <name>template</name>
+          <value>true</value>
+        </option>
+        <option>
+          <name>cache.providerRegistryName</name>
+          <value>apiCacheProvider</value>
+        </option>
+      </options>
     </realm>
     <realm>
-      <id>realm_portal</id>
+      <id>idm_realm_portal</id>
       <repository-id-ref>PortalRepository</repository-id-ref>
       <identity-type-mappings>
         <user-mapping>USER</user-mapping>
       </identity-type-mappings>
+      <options>
+        <option>
+          <name>cache.providerRegistryName</name>
+          <value>apiCacheProvider</value>
+        </option>
+      </options>
     </realm>
-    <realm>
-      <id>realm_sample-portal</id>
-      <repository-id-ref>SamplePortalRepository</repository-id-ref>
-      <identity-type-mappings>
-        <user-mapping>USER</user-mapping>
-      </identity-type-mappings>
-    </realm>
   </realms>
   <repositories>
     <repository>
@@ -77,7 +86,7 @@
       </options>
     </repository>
     <repository>
-      <id>SamplePortalRepository</id>
+      <id>DefaultPortalRepository</id>
       <class>org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository</class>
       <external-config/>
       <default-identity-store-id>HibernateStore</default-identity-store-id>
@@ -360,4 +369,10 @@
       </identity-store>
     </identity-stores>
   </stores>
+  <options>
+      <option>
+         <name>defaultTemplate</name>
+         <value>idm_realm</value>
+      </option>
+  </options>
 </jboss-identity>
\ No newline at end of file

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-config.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-config.xml	2010-03-09 07:39:21 UTC (rev 2048)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-config.xml	2010-03-09 08:01:28 UTC (rev 2049)
@@ -25,26 +25,35 @@
                 xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_ga identity-config.xsd">
   <realms>
     <realm>
-      <id>realm</id>
-      <repository-id-ref>PortalRepository</repository-id-ref>
+      <id>idm_realm</id>
+      <repository-id-ref>DefaultPortalRepository</repository-id-ref>
       <identity-type-mappings>
         <user-mapping>USER</user-mapping>
       </identity-type-mappings>
+      <options>
+        <option>
+          <name>template</name>
+          <value>true</value>
+        </option>
+         <option>
+          <name>cache.providerRegistryName</name>
+          <value>apiCacheProvider</value>
+        </option>
+      </options>
     </realm>
     <realm>
-      <id>realm_portal</id>
+      <id>idm_realm_portal</id>
       <repository-id-ref>PortalRepository</repository-id-ref>
       <identity-type-mappings>
         <user-mapping>USER</user-mapping>
       </identity-type-mappings>
+       <options>
+        <option>
+          <name>cache.providerRegistryName</name>
+          <value>apiCacheProvider</value>
+        </option>
+      </options>
     </realm>
-    <realm>
-      <id>realm_sample-portal</id>
-      <repository-id-ref>SamplePortalRepository</repository-id-ref>
-      <identity-type-mappings>
-        <user-mapping>USER</user-mapping>
-      </identity-type-mappings>
-    </realm>
   </realms>
   <repositories>
     <repository>
@@ -72,7 +81,7 @@
       </options>
     </repository>
     <repository>
-      <id>SamplePortalRepository</id>
+      <id>DefaultPortalRepository</id>
       <class>org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository</class>
       <external-config/>
       <default-identity-store-id>HibernateStore</default-identity-store-id>
@@ -296,4 +305,10 @@
       </identity-store>
     </identity-stores>
   </stores>
+  <options>
+      <option>
+         <name>defaultTemplate</name>
+         <value>idm_realm</value>
+      </option>
+  </options>
 </jboss-identity>
\ No newline at end of file

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-msad-config.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-msad-config.xml	2010-03-09 07:39:21 UTC (rev 2048)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-msad-config.xml	2010-03-09 08:01:28 UTC (rev 2049)
@@ -25,26 +25,35 @@
                 xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_ga identity-config.xsd">
   <realms>
     <realm>
-      <id>realm</id>
-      <repository-id-ref>PortalRepository</repository-id-ref>
+      <id>idm_realm</id>
+      <repository-id-ref>DefaultPortalRepository</repository-id-ref>
       <identity-type-mappings>
         <user-mapping>USER</user-mapping>
       </identity-type-mappings>
+      <options>
+        <option>
+          <name>template</name>
+          <value>true</value>
+        </option>
+        <option>
+          <name>cache.providerRegistryName</name>
+          <value>apiCacheProvider</value>
+        </option>
+      </options>
     </realm>
     <realm>
-      <id>realm_portal</id>
+      <id>idm_realm_portal</id>
       <repository-id-ref>PortalRepository</repository-id-ref>
       <identity-type-mappings>
         <user-mapping>USER</user-mapping>
       </identity-type-mappings>
+      <options>
+        <option>
+          <name>cache.providerRegistryName</name>
+          <value>apiCacheProvider</value>
+        </option>
+      </options>
     </realm>
-    <realm>
-      <id>realm_sample-portal</id>
-      <repository-id-ref>SamplePortalRepository</repository-id-ref>
-      <identity-type-mappings>
-        <user-mapping>USER</user-mapping>
-      </identity-type-mappings>
-    </realm>
   </realms>
   <repositories>
     <repository>
@@ -71,7 +80,7 @@
       </options>
     </repository>
     <repository>
-      <id>SamplePortalRepository</id>
+      <id>DefaultPortalRepository</id>
       <class>org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository</class>
       <external-config/>
       <default-identity-store-id>HibernateStore</default-identity-store-id>
@@ -369,4 +378,10 @@
       </identity-store>
     </identity-stores>
   </stores>
+  <options>
+      <option>
+         <name>defaultTemplate</name>
+         <value>idm_realm</value>
+      </option>
+  </options>
 </jboss-identity>
\ No newline at end of file

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-msad-readonly-config.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-msad-readonly-config.xml	2010-03-09 07:39:21 UTC (rev 2048)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-msad-readonly-config.xml	2010-03-09 08:01:28 UTC (rev 2049)
@@ -25,26 +25,35 @@
                 xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_ga identity-config.xsd">
   <realms>
     <realm>
-      <id>realm</id>
-      <repository-id-ref>PortalRepository</repository-id-ref>
+      <id>idm_realm</id>
+      <repository-id-ref>DefaultPortalRepository</repository-id-ref>
       <identity-type-mappings>
         <user-mapping>USER</user-mapping>
       </identity-type-mappings>
+      <options>
+        <option>
+          <name>template</name>
+          <value>true</value>
+        </option>
+        <option>
+          <name>cache.providerRegistryName</name>
+          <value>apiCacheProvider</value>
+        </option>
+      </options>
     </realm>
     <realm>
-      <id>realm_portal</id>
+      <id>idm_realm_portal</id>
       <repository-id-ref>PortalRepository</repository-id-ref>
       <identity-type-mappings>
         <user-mapping>USER</user-mapping>
       </identity-type-mappings>
+      <options>
+        <option>
+          <name>cache.providerRegistryName</name>
+          <value>apiCacheProvider</value>
+        </option>
+      </options>
     </realm>
-    <realm>
-      <id>realm_sample-portal</id>
-      <repository-id-ref>SamplePortalRepository</repository-id-ref>
-      <identity-type-mappings>
-        <user-mapping>USER</user-mapping>
-      </identity-type-mappings>
-    </realm>
   </realms>
   <repositories>
     <repository>
@@ -76,7 +85,7 @@
       </options>
     </repository>
     <repository>
-      <id>SamplePortalRepository</id>
+      <id>DefaultPortalRepository</id>
       <class>org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository</class>
       <external-config/>
       <default-identity-store-id>HibernateStore</default-identity-store-id>
@@ -323,4 +332,10 @@
       </identity-store>
     </identity-stores>
   </stores>
+  <options>
+      <option>
+         <name>defaultTemplate</name>
+         <value>idm_realm</value>
+      </option>
+  </options>
 </jboss-identity>
\ No newline at end of file

Copied: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml (from rev 2040, portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/jboss-cache.xml)
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml	                        (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml	2010-03-09 08:01:28 UTC (rev 2049)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xmlns="urn:jboss:jbosscache-core:config:3.0">
+
+</jbosscache>

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml	2010-03-09 07:39:21 UTC (rev 2048)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml	2010-03-09 08:01:28 UTC (rev 2049)
@@ -25,60 +25,26 @@
                 xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_ga identity-config.xsd">
   <realms>
     <realm>
-      <id>realm</id>
-      <repository-id-ref>PortalRepository</repository-id-ref>
+      <id>idm_realm</id>
+      <repository-id-ref>DefaultPortalRepository</repository-id-ref>
       <identity-type-mappings>
         <user-mapping>USER</user-mapping>
       </identity-type-mappings>
       <options>
         <option>
-          <name>cache.providerClass</name>
-          <value>org.picketlink.idm.impl.cache.JBossCacheAPICacheProviderImpl</value>
+          <name>template</name>
+          <value>true</value>
         </option>
         <option>
-          <name>cache.configFile</name>
-          <value>picketlink-idm/jboss-cache.xml</value>
+          <name>cache.providerRegistryName</name>
+          <value>apiCacheProvider</value>
         </option>
       </options>
     </realm>
-    <realm>
-      <id>realm_portal</id>
-      <repository-id-ref>PortalRepository</repository-id-ref>
-      <identity-type-mappings>
-        <user-mapping>USER</user-mapping>
-      </identity-type-mappings>
-      <options>
-        <option>
-          <name>cache.providerClass</name>
-          <value>org.picketlink.idm.impl.cache.JBossCacheAPICacheProviderImpl</value>
-        </option>
-        <option>
-          <name>cache.configFile</name>
-          <value>picketlink-idm/jboss-cache.xml</value>
-        </option>
-      </options>
-    </realm>
-    <realm>
-      <id>realm_sample-portal</id>
-      <repository-id-ref>PortalRepository</repository-id-ref>
-      <identity-type-mappings>
-        <user-mapping>USER</user-mapping>
-      </identity-type-mappings>
-      <options>
-        <option>
-          <name>cache.providerClass</name>
-          <value>org.picketlink.idm.impl.cache.JBossCacheAPICacheProviderImpl</value>
-        </option>
-        <option>
-          <name>cache.configFile</name>
-          <value>picketlink-idm/jboss-cache.xml</value>
-        </option>
-      </options>
-    </realm>
   </realms>
   <repositories>
     <repository>
-      <id>PortalRepository</id>
+      <id>DefaultPortalRepository</id>
       <class>org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository</class>
       <external-config/>
       <default-identity-store-id>HibernateStore</default-identity-store-id>
@@ -136,4 +102,10 @@
       </identity-store>
     </identity-stores>
   </stores>
+  <options>
+      <option>
+         <name>defaultTemplate</name>
+         <value>idm_realm</value>
+      </option>
+  </options>
 </jboss-identity>
\ No newline at end of file



More information about the gatein-commits mailing list