You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2006/02/10 23:17:59 UTC

svn commit: r376880 - in /portals/jetspeed-2/trunk/components/page-manager: ./ src/java/org/apache/jetspeed/util/interceptors/ src/test/ src/test/org/apache/jetspeed/page/

Author: taylor
Date: Fri Feb 10 14:17:57 2006
New Revision: 376880

URL: http://svn.apache.org/viewcvs?rev=376880&view=rev
Log:
tested and bug fixed transactional replay interceptors

Added:
    portals/jetspeed-2/trunk/components/page-manager/src/test/interceptors.xml
    portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestTransactions.java
    portals/jetspeed-2/trunk/components/page-manager/src/test/tx-page-manager.xml
Modified:
    portals/jetspeed-2/trunk/components/page-manager/maven.xml
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/util/interceptors/MethodReplayInterceptor.java
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/util/interceptors/TransactionalMethodReplayDecisionMaker.java

Modified: portals/jetspeed-2/trunk/components/page-manager/maven.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/maven.xml?rev=376880&r1=376879&r2=376880&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/maven.xml (original)
+++ portals/jetspeed-2/trunk/components/page-manager/maven.xml Fri Feb 10 14:17:57 2006
@@ -20,7 +20,8 @@
 <!--    <property name='testcase' value='org.apache.jetspeed.page.TestSecureDatabasePageManager' />  -->
 <!--    <property name='testcase' value='org.apache.jetspeed.page.TestDatabasePageManager' />  -->
 <!--    <property name='testcase' value='org.apache.jetspeed.page.TestCastorXmlPageManager' /> -->
-    <property name='testcase' value='org.apache.jetspeed.page.TestCreateUserHomePagesFromRoles' />
+<!--    <property name='testcase' value='org.apache.jetspeed.page.TestCreateUserHomePagesFromRoles' /> -->
+    <property name='testcase' value='org.apache.jetspeed.page.TestTransactions' />
     
 
     <preGoal name="test:test">

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/util/interceptors/MethodReplayInterceptor.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/util/interceptors/MethodReplayInterceptor.java?rev=376880&r1=376879&r2=376880&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/util/interceptors/MethodReplayInterceptor.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/util/interceptors/MethodReplayInterceptor.java Fri Feb 10 14:17:57 2006
@@ -6,121 +6,158 @@
 import org.apache.commons.logging.LogFactory;
 
 /**
- * Generic aspect that will attempt to replay a method invocation
- * if one of a set of specified exceptions is thrown from its execution.
+ * Generic aspect that will attempt to replay a method invocation if one of a
+ * set of specified exceptions is thrown from its execution.
  * 
  * @author a336317
  */
-public class MethodReplayInterceptor implements MethodInterceptor {
-	
-	/** Log reference */
-	private Log log = LogFactory.getLog(MethodReplayInterceptor.class);
-	
-	/** Serialization version identifier */
-	private static final long serialVersionUID = -1316279974504594833L;
-
-	/** How many times we should attempt to retry the method invocation if it fails */
-	private int retryCount;
-	
-	/** How long we should wait before retrying - specified in milliseconds **/
-	private int retryInterval;
-	
-	/** Object which decides whether or not a method invocation should be replayed */
-	private TransactionalMethodReplayDecisionMaker replayDecisionMaker;
-	
-	/**
-	 * Encloses <code>super.invoke()</code> in a try/catch block, where the
-	 * catch block contains additional retry logic.
-	 */
-	public Object invoke(MethodInvocation invocation) throws Throwable {
-		//TODO Make this more elegant - this logic can be simpler
-		try{
-			return invocation.proceed();
-		}
-		catch(Exception exp){
-			
-			//determine whether to retry or just throw the exception back up
-			if(!this.isReplayable(invocation,exp)){
-				throw exp;
-			}
-			
-			//TODO should this be at level WARN/ERROR?
-			if(log.isDebugEnabled()){
-				log.debug("Invocation for method ["+ invocation.getMethod().toString() 
-						+"] failed. Will attempt to replay method invocation ["+ retryCount +"] times with an interval of ["+ retryInterval +"] milliseconds");
-			}
-			
-			int retryCounter = 1;
-			Exception lastExp = null;
-			
-			while((retryCounter<retryCount)){
-				
-				try{
-					if(log.isDebugEnabled()){
-						log.debug("Sleeping for ["+ retryInterval +"] milliseconds before replaying invocation for method ["+ invocation.getMethod().toString() +"].");
-					}
-					Thread.sleep(this.retryInterval);
-					
-					if(log.isDebugEnabled()){
-						log.debug("Attempt invocation ["+ retryCounter +"] for method ["+ invocation.getMethod().toString() +"].");
-					}
-					//returning from a finally block will discard the
-					//exception
-					return invocation.proceed();
-				}
-				catch(Exception exp2){
-					//determine whether to retry or just throw the exception back up
-					if(!this.isReplayable(invocation,exp)){
-						throw exp;
-					}
-					
-					if(log.isDebugEnabled()){
-						log.debug("Attempt ["+ retryCounter +"] to replay invocation for method ["+ invocation.getMethod().toString() 
-								+"] failed. ["+ (retryCount - retryCounter) +"] attempts left.");
-					}
-					
-					lastExp = exp2;
-					retryCounter++;
-				}
-			}
-			if(log.isDebugEnabled()){
-				log.debug("["+ retryCounter +"] attempts to replay invocation for method ["+ invocation.getMethod().toString() 
-						+"] failed. Throwing exception ["+ lastExp.getClass().getName() +"]");
-			}
-			throw lastExp;
-		}
-		
-	}
-
-	public int getRetryCount() {
-		return retryCount;
-	}
-
-	public void setRetryCount(int retryCount) {
-		this.retryCount = retryCount;
-	}
-
-	public int getRetryInterval() {
-		return retryInterval;
-	}
-
-	public void setRetryInterval(int retryInterval) {
-		this.retryInterval = retryInterval;
-	}
-	
-	/**
-	 * Determine if we should attempt to replay the method given that the previous
-	 * invocation returned the passed exception.
-	 * @param exp
-	 * @return True if we should replay the method.
-	 */
-	private boolean isReplayable(MethodInvocation invocation, Exception exp){
-		return replayDecisionMaker.shouldReplay(invocation,exp);
-	}
-
-	public void setReplayDecisionMaker(
-			TransactionalMethodReplayDecisionMaker replayDecisionMaker) {
-		this.replayDecisionMaker = replayDecisionMaker;
-	}
+public class MethodReplayInterceptor implements MethodInterceptor
+{
+
+    /** Log reference */
+    private Log log = LogFactory.getLog(MethodReplayInterceptor.class);
+
+    /** Serialization version identifier */
+    private static final long serialVersionUID = -1316279974504594833L;
+
+    /**
+     * How many times we should attempt to retry the method invocation if it
+     * fails
+     */
+    private int retryCount;
+
+    /** How long we should wait before retrying - specified in milliseconds * */
+    private int retryInterval;
+
+    /**
+     * Object which decides whether or not a method invocation should be
+     * replayed
+     */
+    private TransactionalMethodReplayDecisionMaker replayDecisionMaker;
+
+    /**
+     * Encloses <code>super.invoke()</code> in a try/catch block, where the
+     * catch block contains additional retry logic.
+     */
+    public Object invoke(MethodInvocation invocation) throws Throwable
+    {
+        // TODO Make this more elegant - this logic can be simpler
+        try
+        {
+            return invocation.proceed();
+        } catch (Exception exp)
+        {
+
+            // determine whether to retry or just throw the exception back up
+            if (!this.isReplayable(invocation, exp)) { throw exp; }
+
+            // TODO should this be at level WARN/ERROR?
+            if (log.isDebugEnabled())
+            {
+                log
+                        .debug("Invocation for method ["
+                                + invocation.getMethod().toString()
+                                + "] failed. Will attempt to replay method invocation ["
+                                + retryCount + "] times with an interval of ["
+                                + retryInterval + "] milliseconds");
+            }
+
+            int retryCounter = 1;
+            Exception lastExp = null;
+
+            while ((retryCounter < retryCount))
+            {
+
+                try
+                {
+                    if (log.isDebugEnabled())
+                    {
+                        log
+                                .debug("Sleeping for ["
+                                        + retryInterval
+                                        + "] milliseconds before replaying invocation for method ["
+                                        + invocation.getMethod().toString()
+                                        + "].");
+                    }
+                    Thread.sleep(this.retryInterval);
+
+                    if (log.isDebugEnabled())
+                    {
+                        log.debug("Attempt invocation [" + retryCounter
+                                + "] for method ["
+                                + invocation.getMethod().toString() + "].");
+                    }
+                    // returning from a finally block will discard the
+                    // exception
+                    return invocation.proceed();
+                } catch (Exception exp2)
+                {
+                    // determine whether to retry or just throw the exception
+                    // back up
+                    if (!this.isReplayable(invocation, exp)) { throw exp; }
+
+                    if (log.isDebugEnabled())
+                    {
+                        log.debug("Attempt [" + retryCounter
+                                + "] to replay invocation for method ["
+                                + invocation.getMethod().toString()
+                                + "] failed. [" + (retryCount - retryCounter)
+                                + "] attempts left.");
+                    }
+
+                    lastExp = exp2;
+                    retryCounter++;
+                }
+            }
+            if (log.isDebugEnabled())
+            {
+                log.debug("[" + retryCounter
+                        + "] attempts to replay invocation for method ["
+                        + invocation.getMethod().toString()
+                        + "] failed. Throwing exception ["
+                        + lastExp.getClass().getName() + "]");
+            }
+            throw lastExp;
+        }
+
+    }
+
+    public int getRetryCount()
+    {
+        return retryCount;
+    }
+
+    public void setRetryCount(int retryCount)
+    {
+        this.retryCount = retryCount;
+    }
+
+    public int getRetryInterval()
+    {
+        return retryInterval;
+    }
+
+    public void setRetryInterval(int retryInterval)
+    {
+        this.retryInterval = retryInterval;
+    }
+
+    /**
+     * Determine if we should attempt to replay the method given that the
+     * previous invocation returned the passed exception.
+     * 
+     * @param exp
+     * @return True if we should replay the method.
+     */
+    private boolean isReplayable(MethodInvocation invocation, Exception exp)
+    {
+        return replayDecisionMaker.shouldReplay(invocation, exp);
+    }
+
+    public void setReplayDecisionMaker(
+            TransactionalMethodReplayDecisionMaker replayDecisionMaker)
+    {
+        this.replayDecisionMaker = replayDecisionMaker;
+    }
 
 }

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/util/interceptors/TransactionalMethodReplayDecisionMaker.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/util/interceptors/TransactionalMethodReplayDecisionMaker.java?rev=376880&r1=376879&r2=376880&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/util/interceptors/TransactionalMethodReplayDecisionMaker.java (original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/util/interceptors/TransactionalMethodReplayDecisionMaker.java Fri Feb 10 14:17:57 2006
@@ -6,77 +6,81 @@
 import org.aopalliance.intercept.MethodInvocation;
 
 /**
- * MethodReplayDecisionMaker intended for use with methods marked as transactional,
- * where the decision to replay the method is based on the content of the underlying
- * exception from the resource.
+ * MethodReplayDecisionMaker intended for use with methods marked as
+ * transactional, where the decision to replay the method is based on the
+ * content of the underlying exception from the resource.
  * 
  * @author a336317
  */
 public class TransactionalMethodReplayDecisionMaker implements
-		MethodReplayDecisionMaker {
-	
-	private int[] sqlErrorCodes;
-
-	public boolean shouldReplay(MethodInvocation invocation, Exception exception) {
-		
-		//TODO This needs to be a lot more elegant than it currently is - see Spring code
-		//for exception translators to see what we can do here.
-		
-		//exception must be of type SQLException and have an error code value, else we keep
-		//walking down the root cause tree to a maximum depth of 3
-		if(exception.getCause() instanceof SQLException){
-			SQLException sqlExp = (SQLException)exception.getCause();
-			int errorCode = sqlExp.getErrorCode();
-			
-			if(errorCode!=0){
-				return isErrorCodeListed(errorCode);
-			}
-		}
-		
-		if(exception.getCause().getCause() instanceof SQLException){
-			
-			SQLException sqlExp = (SQLException)exception.getCause().getCause();
-			int errorCode = sqlExp.getErrorCode();
-			
-			
-			if(errorCode!=0){
-				return isErrorCodeListed(errorCode);
-			}
-		}
-		
-		if(exception.getCause().getCause().getCause() instanceof SQLException){
-			SQLException sqlExp = (SQLException)exception.getCause().getCause().getCause();
-			int errorCode = sqlExp.getErrorCode();
-			
-			
-			if(errorCode!=0){
-				return isErrorCodeListed(errorCode);
-			}
-		}
-		
-		
-		return false;
-	}
-
-
-	public void setSqlErrorCodes(String sqlErrorCodesString) {
-		StringTokenizer tokenizer = new StringTokenizer(sqlErrorCodesString,",");
-		
-		this.sqlErrorCodes = new int[tokenizer.countTokens()];
-		
-		for(int i=0;tokenizer.hasMoreTokens();i++){
-			this.sqlErrorCodes[i] = new Integer(tokenizer.nextToken()).intValue();			
-		}
-	}
-	
-	
-	private boolean isErrorCodeListed(int errorCode){
-		for(int i=0;i<this.sqlErrorCodes.length;i++){
-			
-			if(this.sqlErrorCodes[i]==errorCode) return true;
-			
-		}
-		return false;
-	}
+        MethodReplayDecisionMaker
+{
+
+    private int[] sqlErrorCodes;
+
+    public boolean shouldReplay(MethodInvocation invocation, Exception exception)
+    {
+        // TODO This needs to be a lot more elegant than it currently is - see
+        // Spring code
+        // for exception translators to see what we can do here.
+
+        // exception must be of type SQLException and have an error code value,
+        // else we keep
+        // walking down the root cause tree to a maximum depth of 3
+        if (exception.getCause() instanceof SQLException)
+        {
+            SQLException sqlExp = (SQLException) exception.getCause();
+
+            int errorCode = sqlExp.getErrorCode();
+
+            if (errorCode != 0) { return isErrorCodeListed(errorCode); }
+        }
+
+        if (exception.getCause().getCause() instanceof SQLException)
+        {
+
+            SQLException sqlExp = (SQLException) exception.getCause()
+                    .getCause();
+            int errorCode = sqlExp.getErrorCode();
+
+            if (errorCode != 0) { return isErrorCodeListed(errorCode); }
+        }
+
+        if (exception.getCause().getCause().getCause() instanceof SQLException)
+        {
+            SQLException sqlExp = (SQLException) exception.getCause()
+                    .getCause().getCause();
+            int errorCode = sqlExp.getErrorCode();
+
+            if (errorCode != 0) { return isErrorCodeListed(errorCode); }
+        }
+
+        return false;
+    }
+
+    public void setSqlErrorCodes(String sqlErrorCodesString)
+    {
+        StringTokenizer tokenizer = new StringTokenizer(sqlErrorCodesString,
+                ",");
+
+        this.sqlErrorCodes = new int[tokenizer.countTokens()];
+
+        for (int i = 0; tokenizer.hasMoreTokens(); i++)
+        {
+            String token = tokenizer.nextToken();
+            this.sqlErrorCodes[i] = new Integer(token.trim()).intValue();
+        }
+    }
+
+    private boolean isErrorCodeListed(int errorCode)
+    {
+        for (int i = 0; i < this.sqlErrorCodes.length; i++)
+        {
+
+            if (this.sqlErrorCodes[i] == errorCode) return true;
+
+        }
+        return false;
+    }
 
 }

Added: portals/jetspeed-2/trunk/components/page-manager/src/test/interceptors.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/test/interceptors.xml?rev=376880&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/test/interceptors.xml (added)
+++ portals/jetspeed-2/trunk/components/page-manager/src/test/interceptors.xml Fri Feb 10 14:17:57 2006
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+   <bean id="replayDecisionMakerBean"
+        class="org.apache.jetspeed.util.interceptors.TransactionalMethodReplayDecisionMaker">
+        <property name="sqlErrorCodes">
+<!--            <value>400, -80</value> -->
+             <value>9999</value>
+        </property>
+    </bean>
+
+    <bean id="methodReplayInterceptor" class="org.apache.jetspeed.util.interceptors.MethodReplayInterceptor">
+        <property name="retryCount">
+            <value>3</value>
+        </property>
+        <property name="retryInterval">
+            <value>500</value></property> <!-- retry every 500 milliseconds -->
+        <property name="replayDecisionMaker">
+            <ref bean="replayDecisionMakerBean"/>
+        </property>
+    </bean>
+
+    <bean id="baseTransactionProxy2" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
+                        abstract="true">
+        <property name="transactionManager"><ref bean="transactionManager"/></property>
+        <property name="transactionAttributes">
+            <props>
+                <prop key="*">PROPAGATION_REQUIRED</prop>
+            </props>
+        </property>
+        <property name="preInterceptors"> 
+            <list>
+                <ref local="methodReplayInterceptor" />
+            </list>
+        </property>
+    </bean>
+    
+</beans>

Added: portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestTransactions.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestTransactions.java?rev=376880&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestTransactions.java (added)
+++ portals/jetspeed-2/trunk/components/page-manager/src/test/org/apache/jetspeed/page/TestTransactions.java Fri Feb 10 14:17:57 2006
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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.
+ */
+package org.apache.jetspeed.page;
+
+import java.security.Principal;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+                                                                                                     
+import javax.security.auth.Subject;
+
+import org.apache.jetspeed.components.util.DatasourceEnabledSpringTestCase;
+import org.apache.jetspeed.om.common.SecurityConstraint;
+import org.apache.jetspeed.om.common.SecurityConstraints;
+import org.apache.jetspeed.om.folder.Folder;
+import org.apache.jetspeed.om.folder.FolderNotFoundException;
+import org.apache.jetspeed.om.page.Fragment;
+import org.apache.jetspeed.om.page.Link;
+import org.apache.jetspeed.om.page.Page;
+import org.apache.jetspeed.om.page.PageSecurity;
+import org.apache.jetspeed.om.page.SecurityConstraintsDef;
+import org.apache.jetspeed.security.UserPrincipal;
+import org.apache.jetspeed.security.impl.PrincipalsSet;
+import org.apache.jetspeed.security.impl.RolePrincipalImpl;
+import org.apache.jetspeed.security.impl.UserPrincipalImpl;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * TestSecureDatabasePageManager
+ * 
+ * @author <a href="rwatler@apache.org">Randy Watler</a>
+ * @version $Id: $
+ *          
+ */
+public class TestTransactions extends DatasourceEnabledSpringTestCase implements PageManagerTestShared
+{
+    protected PageManager pageManager;
+
+    protected String somePortletId;
+    
+    public static void main(String args[])
+    {
+        junit.awtui.TestRunner.main(new String[]
+        { TestTransactions.class.getName() });
+    }
+    
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+        pageManager = (PageManager)ctx.getBean("pageManager");
+    }
+
+    public static Test suite()
+    {
+        // All methods starting with "test" will be executed in the test suite.
+        return new TestSuite(TestTransactions.class);
+    }
+    
+    protected String[] getConfigurations()
+    {
+        return new String[]
+        { "tx-page-manager.xml", "transaction.xml", "interceptors.xml" }; 
+    }
+
+    public void testTx() throws Exception
+    {
+        Folder root = pageManager.newFolder("/");
+        pageManager.updateFolder(root);
+        Page[] pages = new Page[3];
+        pages[0] = pageManager.newPage("/test1.psml");
+        pages[1] = pageManager.newPage("/test2.psml");
+        pages[2] = pageManager.newPage("/test3.psml");
+        try
+        {
+            pageManager.addPages(pages);
+        }
+        catch (Exception e)
+        {
+            System.out.println("Exception adding pages" + e);
+            e.printStackTrace();
+            
+        }
+        assertFalse("page 1 found", pageManager.pageExists("/test1.psml"));
+        assertFalse("page 2 found", pageManager.pageExists("/test2.psml"));
+        assertFalse("page 3 found", pageManager.pageExists("/test3.psml"));
+    }
+}

Added: portals/jetspeed-2/trunk/components/page-manager/src/test/tx-page-manager.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/test/tx-page-manager.xml?rev=376880&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/test/tx-page-manager.xml (added)
+++ portals/jetspeed-2/trunk/components/page-manager/src/test/tx-page-manager.xml Fri Feb 10 14:17:57 2006
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+Copyright 2004 The Apache Software Foundation
+
+Licensed 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.
+-->
+<beans>
+
+    <!-- Page Manager -->
+    <bean id="org.apache.jetspeed.page.PageManagerImpl" 
+          name="securePageManagerImpl"
+          init-method="init"
+          class="org.apache.jetspeed.page.impl.DatabasePageManager">
+        <!-- OJB configuration file resource path -->
+        <constructor-arg index="0"><value>JETSPEED-INF/ojb/page-manager-repository.xml</value></constructor-arg>       
+        <!-- folder/page/link cache size, default=128, min=128 -->
+        <constructor-arg index="1"><value>128</value></constructor-arg>
+        <!-- folder/page/link cache expires seconds, default=150, infinite=0, min=30 -->
+        <constructor-arg index="2"><value>0</value></constructor-arg>
+        <!-- permissions security enabled flag, default=false -->
+        <constructor-arg index="3"><value>false</value></constructor-arg>
+        <!-- constraints security enabled flag, default=true -->
+        <constructor-arg index="4"><value>false</value></constructor-arg>
+    </bean>
+
+    <!-- Transaction Proxying -->
+    <bean id="org.apache.jetspeed.page.PageManager" name="pageManager" parent="baseTransactionProxy2">
+        <property name="proxyInterfaces">
+            <value>org.apache.jetspeed.page.PageManager</value>
+        </property>
+        <property name="target">
+            <ref bean="securePageManagerImpl" />
+        </property>
+        <property name="transactionAttributes">
+            <props>
+                <prop key="*">PROPAGATION_SUPPORTS</prop>
+                <prop key="get*">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
+                <prop key="update*">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
+                <prop key="remove*">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.document.NodeException</prop>
+                <prop key="create*">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.PageNotUpdatedException</prop>                                								
+                <prop key="deepCopyFolder*">PROPAGATION_REQUIRED,-org.apache.jetspeed.page.PageNotUpdatedException</prop>
+                <prop key="addPages*">PROPAGATION_REQUIRED,-org.apache.jetspeed.exception.JetspeedException</prop>                                
+            </props>
+        </property>
+    </bean>
+
+
+</beans>



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