portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r736729 - in /portals/jetspeed-2/portal/branches/JPA_BRANCH: components/jetspeed-portal/src/test/java/JETSPEED-INF/spring/ components/jetspeed-portal/src/test/java/org/apache/jetspeed/ components/jetspeed-profiler/ components/jetspeed-profi...
Date Thu, 22 Jan 2009 18:02:24 GMT
Author: rwatler
Date: Thu Jan 22 10:02:23 2009
New Revision: 736729

URL: http://svn.apache.org/viewvc?rev=736729&view=rev
Log:
Merge Commits 736034:736692 from Trunk
----------------------------------------
- fix rdbms/jndi unit test
- TODO: fix unit tests past portal-site


Added:
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/test/java/JETSPEED-INF/spring/JetspeedPrincipalManagerProviderOverride.xml
      - copied unchanged from r736692, portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/JETSPEED-INF/spring/JetspeedPrincipalManagerProviderOverride.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/src/test/java/JETSPEED-INF/
      - copied from r736692, portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/test/java/JETSPEED-INF/
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/src/test/java/JETSPEED-INF/spring/
      - copied from r736692, portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/test/java/JETSPEED-INF/spring/
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/src/test/java/JETSPEED-INF/spring/JetspeedPrincipalManagerProviderOverride.xml
      - copied unchanged from r736692, portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/test/java/JETSPEED-INF/spring/JetspeedPrincipalManagerProviderOverride.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/test/resources/
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/test/resources/jndi.properties
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/test/java/JETSPEED-INF/spring/JetspeedPrincipalManagerProviderOverride.xml
      - copied unchanged from r736692, portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/JETSPEED-INF/spring/JetspeedPrincipalManagerProviderOverride.xml
Modified:
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractRequestContextTestCase.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/pom.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestOpenJPAProfiler.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestProfiler.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/jndi/NamingJavaJNDIComponent.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/test/java/org/apache/jetspeed/components/TestRDBMS.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/AbstractSecurityTestcase.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/maven/jetspeed-maven-utils/src/main/java/org/apache/jetspeed/maven/utils/SqlScripts.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/src/site/xdoc/new-security.xml

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractRequestContextTestCase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractRequestContextTestCase.java?rev=736729&r1=736728&r2=736729&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractRequestContextTestCase.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractRequestContextTestCase.java
Thu Jan 22 10:02:23 2009
@@ -40,6 +40,7 @@
         confList.add("security-atn.xml");
         confList.add("security-spi-atn.xml");
         confList.add("security-atz.xml");
+        confList.add("JETSPEED-INF/spring/JetspeedPrincipalManagerProviderOverride.xml");
       
         return (String[]) confList.toArray(new String[confList.size()]);
     }
 

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/pom.xml?rev=736729&r1=736728&r2=736729&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/pom.xml (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/pom.xml Thu
Jan 22 10:02:23 2009
@@ -89,11 +89,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>${pom.groupId}</groupId>
-            <artifactId>jetspeed-sso</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>javax.transaction</groupId>
             <artifactId>jta</artifactId>
             <scope>test</scope>
@@ -198,6 +193,12 @@
                 <directory>src/test/resources</directory>
                 <filtering>true</filtering>
             </testResource>
+            <testResource>
+                <directory>src/test/java</directory>
+                <excludes>
+                    <exclude>**/*.java</exclude>
+                </excludes>
+            </testResource>            
         </testResources>
     </build>
 </project>

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestOpenJPAProfiler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestOpenJPAProfiler.java?rev=736729&r1=736728&r2=736729&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestOpenJPAProfiler.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestOpenJPAProfiler.java
Thu Jan 22 10:02:23 2009
@@ -48,9 +48,9 @@
     protected String[] getConfigurations()
     {
         return new String[] {"openjpa-profiler.xml", "transaction.xml", "serializer.xml",
"security-providers.xml", "cache-test.xml",
-                             "capabilities.xml", "registry.xml", "search.xml", "jetspeed-spring.xml",
"sso.xml",
-                             "security-managers.xml", "security-spi.xml", "security-spi-atn.xml",
"security-atz.xml",
-                             "static-bean-references.xml" };
+                             "capabilities.xml", "registry.xml", "search.xml", "jetspeed-spring.xml",
"security-managers.xml",
+                             "security-spi.xml", "security-spi-atn.xml", "security-atz.xml",
"static-bean-references.xml",
+                             "JETSPEED-INF/spring/JetspeedPrincipalManagerProviderOverride.xml"
};
     }
 
     /* (non-Javadoc)

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestProfiler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestProfiler.java?rev=736729&r1=736728&r2=736729&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestProfiler.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestProfiler.java
Thu Jan 22 10:02:23 2009
@@ -156,9 +156,9 @@
     protected String[] getConfigurations()
     {
         return new String[] { "profiler.xml", "transaction.xml", "serializer.xml", "security-providers.xml",
"cache-test.xml",
-                              "capabilities.xml", "registry.xml", "search.xml", "jetspeed-spring.xml",
"sso.xml",
-                              "security-managers.xml", "security-spi.xml", "security-spi-atn.xml",
"security-atz.xml",
-                              "static-bean-references.xml" };
+                              "capabilities.xml", "registry.xml", "search.xml", "jetspeed-spring.xml",
"security-managers.xml",
+                              "security-spi.xml", "security-spi-atn.xml", "security-atz.xml",
"static-bean-references.xml",
+                              "JETSPEED-INF/spring/JetspeedPrincipalManagerProviderOverride.xml"
};
     }
 
     /* (non-Javadoc)
@@ -581,7 +581,9 @@
         System.out.println("Maintenance tests completed.");
     }
 
-    protected RuleCriterion addRuleCriterion(ProfilingRule rule, String criterionName, String
criterionType, String criterionValue,int fallbackOrder, int fallbackType) throws Exception
+    protected RuleCriterion addRuleCriterion(ProfilingRule rule,  
+                                   String criterionName, String criterionType, String criterionValue,int
fallbackOrder, int fallbackType)
+    throws Exception
     {
         assertTrue("ProfilingRule is not null", (rule != null));
 

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/jndi/NamingJavaJNDIComponent.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/jndi/NamingJavaJNDIComponent.java?rev=736729&r1=736728&r2=736729&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/jndi/NamingJavaJNDIComponent.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/jndi/NamingJavaJNDIComponent.java
Thu Jan 22 10:02:23 2009
@@ -156,6 +156,12 @@
      */
     public void unbindObject(String name) throws NamingException
     {
-        rootContext.unbind("java:"+name);
+        try
+        {
+            rootContext.unbind("java:"+name);
+        }
+        catch (NameNotFoundException nnfe)
+        {
+        }
     }
 }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/test/java/org/apache/jetspeed/components/TestRDBMS.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/test/java/org/apache/jetspeed/components/TestRDBMS.java?rev=736729&r1=736728&r2=736729&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/test/java/org/apache/jetspeed/components/TestRDBMS.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/test/java/org/apache/jetspeed/components/TestRDBMS.java
Thu Jan 22 10:02:23 2009
@@ -60,7 +60,7 @@
 
         InitialContext context = new InitialContext();
         //look up from jndi
-        assertNotNull(context.lookup("java:/jdbc/jetspeed"));
+        assertNotNull(context.lookup("java:jdbc/jetspeed"));
         assertNotNull(datasourceComponent);
         DataSource ds = datasourceComponent.getDatasource();
         assertNotNull(ds);
@@ -73,8 +73,8 @@
         
         try
         {
-            context.lookup("java:/jdbc/jetspeed");
-            assertNotNull("java:/jdbc/jetspeed was not unbound", null);
+            context.lookup("java:jdbc/jetspeed");
+            assertNotNull("java:jdbc/jetspeed was not unbound", null);
         }
         catch (NamingException e)
         {

Added: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/test/resources/jndi.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/test/resources/jndi.properties?rev=736729&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/test/resources/jndi.properties
(added)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-rdbms/src/test/resources/jndi.properties
Thu Jan 22 10:02:23 2009
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# ------------------------------------------------------------------------
+#
+# JNDI Naming Configuration
+#
+# $Id: $
+#
+# ------------------------------------------------------------------------
+
+java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory
+java.naming.factory.url.pkgs=org.apache.naming

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java?rev=736729&r1=736728&r2=736729&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java
Thu Jan 22 10:02:23 2009
@@ -128,8 +128,8 @@
         criteria.addEqualTo("associationsTo.associationName", associationName);
         criteria.addEqualTo("associationsTo.from.name", principalFromName);
         criteria.addEqualTo("type", to.getName());
-        criteria.addEqualTo("associationsTo.to.domainId", toSecurityDomain);
         criteria.addEqualTo("associationsTo.from.domainId", fromSecurityDomain);
+        criteria.addEqualTo("domainId", toSecurityDomain);
         Query query = QueryFactory.newQuery(PersistentJetspeedPrincipal.class, criteria);
         return (List<JetspeedPrincipal>) getPersistenceBrokerTemplate().execute(new
ManagedListByQueryCallback(query));
     }
@@ -146,8 +146,8 @@
         criteria.addEqualTo("associationsFrom.associationName", associationName);
         criteria.addEqualTo("associationsFrom.to.name", principalToName);
         criteria.addEqualTo("type", from.getName());
-        criteria.addEqualTo("associationsFrom.from.domainId", fromSecurityDomain);
         criteria.addEqualTo("associationsFrom.to.domainId", toSecurityDomain);
+        criteria.addEqualTo("domainId", fromSecurityDomain);
         Query query = QueryFactory.newQuery(PersistentJetspeedPrincipal.class, criteria);
         return (List<JetspeedPrincipal>) getPersistenceBrokerTemplate().execute(new
ManagedListByQueryCallback(query));
     }
@@ -164,8 +164,8 @@
         criteria.addEqualTo("associationsTo.associationName", associationName);
         criteria.addEqualTo("associationsTo.from.id", principalFromId);
         criteria.addEqualTo("type", to.getName());
-        criteria.addEqualTo("associationsTo.to.domainId", toSecurityDomain);
         criteria.addEqualTo("associationsTo.from.domainId", fromSecurityDomain);
+        criteria.addEqualTo("domainId", toSecurityDomain);
         Query query = QueryFactory.newQuery(PersistentJetspeedPrincipal.class, criteria);
         return (List<JetspeedPrincipal>) getPersistenceBrokerTemplate().execute(new
ManagedListByQueryCallback(query));
     }
@@ -182,8 +182,8 @@
         criteria.addEqualTo("associationsFrom.associationName", associationName);
         criteria.addEqualTo("associationsFrom.to.id", principalToId);
         criteria.addEqualTo("type", from.getName());
-        criteria.addEqualTo("associationsFrom.from.domainId", fromSecurityDomain);
         criteria.addEqualTo("associationsFrom.to.domainId", toSecurityDomain);
+        criteria.addEqualTo("domainId", fromSecurityDomain);
         Query query = QueryFactory.newQuery(PersistentJetspeedPrincipal.class, criteria);
         return (List<JetspeedPrincipal>) getPersistenceBrokerTemplate().execute(new
ManagedListByQueryCallback(query));
     }
@@ -200,8 +200,8 @@
         criteria.addEqualTo("associationsTo.associationName", associationName);
         criteria.addEqualTo("associationsTo.from.name", principalFromName);
         criteria.addEqualTo("type", to.getName());
-        criteria.addEqualTo("associationsTo.to.domainId", toSecurityDomain);
-        criteria.addEqualTo("associationsFrom.from.domainId", fromSecurityDomain);
+        criteria.addEqualTo("associationsTo.from.domainId", fromSecurityDomain);
+        criteria.addEqualTo("domainId", toSecurityDomain);
         ReportQueryByCriteria query = QueryFactory.newReportQuery(PersistentJetspeedPrincipal.class,
criteria);
         query.setAttributes(new String[]{"name"});
         ArrayList<String> names = new ArrayList<String>();
@@ -224,8 +224,8 @@
         criteria.addEqualTo("associationsTo.associationName", associationName);
         criteria.addEqualTo("associationsTo.from.id", principalFromId);
         criteria.addEqualTo("type", to.getName());
-        criteria.addEqualTo("associationsTo.to.domainId", toSecurityDomain);
         criteria.addEqualTo("associationsTo.from.domainId", fromSecurityDomain);
+        criteria.addEqualTo("domainId", toSecurityDomain);
         ReportQueryByCriteria query = QueryFactory.newReportQuery(PersistentJetspeedPrincipal.class,
criteria);
         query.setAttributes(new String[]{"name"});
         ArrayList<String> names = new ArrayList<String>();
@@ -248,8 +248,8 @@
         criteria.addEqualTo("associationsFrom.associationName", associationName);
         criteria.addEqualTo("associationsFrom.to.name", principalToName);
         criteria.addEqualTo("type", from.getName());
-        criteria.addEqualTo("associationsFrom.from.domainId", fromSecurityDomain);
         criteria.addEqualTo("associationsFrom.to.domainId", toSecurityDomain);
+        criteria.addEqualTo("domainId", fromSecurityDomain);
         ReportQueryByCriteria query = QueryFactory.newReportQuery(PersistentJetspeedPrincipal.class,
criteria);
         query.setAttributes(new String[]{"name"});
         ArrayList<String> names = new ArrayList<String>();
@@ -272,8 +272,8 @@
         criteria.addEqualTo("associationsFrom.associationName", associationName);
         criteria.addEqualTo("associationsFrom.to.id", principalToId);
         criteria.addEqualTo("type", from.getName());
-        criteria.addEqualTo("associationsFrom.from.domainId", fromSecurityDomain);
         criteria.addEqualTo("associationsFrom.to.domainId", toSecurityDomain);
+        criteria.addEqualTo("domainId", fromSecurityDomain);
         ReportQueryByCriteria query = QueryFactory.newReportQuery(PersistentJetspeedPrincipal.class,
criteria);
         query.setAttributes(new String[]{"name"});
         ArrayList<String> names = new ArrayList<String>();

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/AbstractSecurityTestcase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/AbstractSecurityTestcase.java?rev=736729&r1=736728&r2=736729&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/AbstractSecurityTestcase.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/AbstractSecurityTestcase.java
Thu Jan 22 10:02:23 2009
@@ -34,6 +34,9 @@
 import org.apache.jetspeed.security.User;
 import org.apache.jetspeed.security.UserManager;
 import org.apache.jetspeed.security.SecurityException;
+import org.apache.jetspeed.security.impl.SecurityDomainImpl;
+import org.apache.jetspeed.security.spi.SecurityDomainAccessManager;
+import org.apache.jetspeed.security.spi.SecurityDomainStorageManager;
 
 /**
  * @author <a href="mailto:sweaver@einnovation.com">Scott T. Weaver </a>
@@ -55,6 +58,9 @@
     /** The permission manager. */
     protected PermissionManager pms;
 
+    protected SecurityDomainStorageManager domainStorageManager;
+    protected SecurityDomainAccessManager domainAccessManager;
+    
     /**
      * @see junit.framework.TestCase#setUp()
      */
@@ -70,10 +76,31 @@
         // Authorization.
         pms = (PermissionManager) scm.getComponent("org.apache.jetspeed.security.PermissionManager");
         
+        domainStorageManager = (SecurityDomainStorageManager) scm.getComponent(SecurityDomainStorageManager.class.getName());
+        domainAccessManager = (SecurityDomainAccessManager) scm.getComponent("org.apache.jetspeed.security.spi.SecurityDomainAccessManager");
+
+        // TODO: remove when default seed contains the default domain        
+        SecurityDomain domain = domainAccessManager.getDomainByName(SecurityDomain.SYSTEM_NAME);

+        if (domain == null){
+            
+            SecurityDomainImpl newDomain = new SecurityDomainImpl();
+            newDomain.setName(SecurityDomain.SYSTEM_NAME);
+            domainStorageManager.addDomain(newDomain);
+        } 
+        domain = domainAccessManager.getDomainByName(SecurityDomain.DEFAULT_NAME); 
+        if (domain == null){
+            
+            SecurityDomainImpl newDomain = new SecurityDomainImpl();
+            newDomain.setName(SecurityDomain.DEFAULT_NAME);
+            domainStorageManager.addDomain(newDomain);
+        }
+
         new JetspeedActions(new String[] {"secure"}, new String[] {});
         
         destroyPrincipals();
         destroyPermissions();
+        
+
     }
 
     protected void tearDown() throws Exception
@@ -130,6 +157,9 @@
         confList.add("transaction.xml");
         confList.add("cache-test.xml");
         confList.add("static-bean-references.xml");
+        // override the JetspeedPrincipalManagerProvider bean to get rid of
+        // dependency on SSO
+        confList.add("JETSPEED-INF/spring/JetspeedPrincipalManagerProviderOverride.xml");
         return (String[]) confList.toArray(new String[1]);
     }
 

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/maven/jetspeed-maven-utils/src/main/java/org/apache/jetspeed/maven/utils/SqlScripts.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/maven/jetspeed-maven-utils/src/main/java/org/apache/jetspeed/maven/utils/SqlScripts.java?rev=736729&r1=736728&r2=736729&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/maven/jetspeed-maven-utils/src/main/java/org/apache/jetspeed/maven/utils/SqlScripts.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/maven/jetspeed-maven-utils/src/main/java/org/apache/jetspeed/maven/utils/SqlScripts.java
Thu Jan 22 10:02:23 2009
@@ -184,7 +184,7 @@
             }
             catch (Exception e)
             {
-                throw new MojoExecutionException("Unepected error", e);
+                throw new MojoExecutionException("Unexpected error", e);
             }
             finally
             {

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/src/site/xdoc/new-security.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/src/site/xdoc/new-security.xml?rev=736729&r1=736728&r2=736729&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/src/site/xdoc/new-security.xml (original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/src/site/xdoc/new-security.xml Thu Jan 22
10:02:23 2009
@@ -20,7 +20,7 @@
 		<title>Security 2.2</title>
 		<subtitle>New Security in Version 2.2</subtitle>
 		<authors>
-			<person name="Dennis Dam" email="d.dam@onehippo.com" />
+			<person name="Dennis Dam" email="ddam@apache.org" />
 			<person name="David Sean Taylor" email="taylor@apache.org" />
 		</authors>
 	</properties>
@@ -43,7 +43,7 @@
  A user principal can then be associated with several other principals, which can be of the
same (user principal) or different type (e.g. role, group, ..). 
  Principals are resolved in a nested manner, which means that each principal that is associated
with the user principal can also be associated with other principals, 
  which can in turn be associated with other principals, etc. The final collection of principals
found in this way is aggregated and attached to the Subject that is 
- resolved for the authenticated user. The Subject is used throughout Jetspeed for security
purposed and can also be used by portlet applications to secure custom objects 
+ resolved for the authenticated user. The Subject is used throughout Jetspeed for security
purposes and can also be used by portlet applications to secure custom objects 
  using standard JAAS API.			
 			</p>
 			</subsection>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message