[seam-commits] Seam SVN: r10401 - in trunk/examples/wiki/src: main/org/jboss/seam/wiki/connectors/cache and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Apr 14 11:47:39 EDT 2009


Author: christian.bauer at jboss.com
Date: 2009-04-14 11:47:38 -0400 (Tue, 14 Apr 2009)
New Revision: 10401

Modified:
   trunk/examples/wiki/src/etc/WEB-INF/pages.xml
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java
Log:
JBSEAM-4040, better handling of LocktimeoutException on caches

Modified: trunk/examples/wiki/src/etc/WEB-INF/pages.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/pages.xml	2009-04-14 15:46:32 UTC (rev 10400)
+++ trunk/examples/wiki/src/etc/WEB-INF/pages.xml	2009-04-14 15:47:38 UTC (rev 10401)
@@ -262,6 +262,11 @@
 
         <navigation>
 
+            <!-- More complex rules decide what to do after login, encapsulated in UserLogin -->
+            <rule if-outcome="loggedIn">
+                <redirect url="#{userLogin.loginRedirectURL}"/>
+            </rule>
+
             <!-- Go to start page on logout because the session has been invalidated -->
             <rule if-outcome="loggedOut">
                 <end-conversation before-redirect="true"/>
@@ -327,24 +332,23 @@
         <description>#{messages['lacewiki.label.userList.MemberList']} (#{messages['lacewiki.label.userList.Results']}: #{userSearch.rowCount})</description>
     </page>
 
-
-    <exception class="javax.faces.application.ViewExpiredException">
-        <end-conversation/>
+    <exception class="javax.faces.application.ViewExpiredException" log="false">
+        <end-conversation before-redirect="true"/>
         <redirect view-id="/wiki.xhtml">
             <message severity="WARN">#{messages['lacewiki.msg.SessionTimeoutOccured']}</message>
         </redirect>
     </exception>
 
     <exception class="org.jboss.seam.wiki.core.nestedset.listener.NestedSetLockTimeoutException">
-        <end-conversation/>
+        <end-conversation before-redirect="true"/>
         <redirect view-id="/wiki.xhtml">
             <message severity="WARN">#{messages['lacewiki.msg.LockTimeoutError']}</message>
         </redirect>
     </exception>
 
     <!-- This occurs on concurrent delete of comments -->
-    <exception class="javax.persistence.EntityNotFoundException">
-        <end-conversation/>
+    <exception class="javax.persistence.EntityNotFoundException" log="false">
+        <end-conversation before-redirect="true"/>
         <redirect view-id="/wiki.xhtml">
             <message severity="WARN">#{messages['lacewiki.msg.EntityNotFound']}</message>
         </redirect>
@@ -365,19 +369,26 @@
         </redirect>
     </exception>
 
-    <exception class="org.jboss.seam.framework.EntityNotFoundException">
+    <exception class="org.jboss.seam.core.LockTimeoutException">
+        <end-conversation before-redirect="true"/>
+        <redirect view-id="/wiki.xhtml">
+            <message severity="WARN">#{messages['lacewiki.msg.LockTimeoutError']}</message>
+        </redirect>
+    </exception>
+
+    <exception class="org.jboss.seam.framework.EntityNotFoundException" log="false">
         <end-conversation/>
         <http-error error-code="404"/>
     </exception>
 
-    <exception class="org.jboss.seam.wiki.core.exception.InvalidWikiRequestException">
+    <exception class="org.jboss.seam.wiki.core.exception.InvalidWikiRequestException" log="false">
         <end-conversation/>
         <http-error error-code="400">
             <message>#{org.jboss.seam.handledException.message}</message>
         </http-error>
     </exception>
 
-    <exception class="javax.faces.validator.ValidatorException">
+    <exception class="javax.faces.validator.ValidatorException" log="false">
         <end-conversation/>
         <http-error error-code="400">
             <message>#{messages['lacewiki.msg.RequestError']}</message>

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java	2009-04-14 15:46:32 UTC (rev 10400)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java	2009-04-14 15:47:38 UTC (rev 10401)
@@ -28,7 +28,7 @@
  * @author Christian Bauer
  */
 @Scope(ScopeType.APPLICATION)
- at Synchronized
+ at Synchronized(timeout = 5000)
 public abstract class ConnectorCache<T, K> {
 
     @Logger




More information about the seam-commits mailing list