Return-Path: Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: (qmail 31789 invoked from network); 29 Mar 2006 23:27:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Mar 2006 23:27:59 -0000 Received: (qmail 41421 invoked by uid 500); 29 Mar 2006 23:27:55 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 41372 invoked by uid 500); 29 Mar 2006 23:27:55 -0000 Mailing-List: contact jetspeed-dev-help@portals.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@portals.apache.org Received: (qmail 41335 invoked by uid 500); 29 Mar 2006 23:27:55 -0000 Delivered-To: apmail-jakarta-jetspeed-dev@jakarta.apache.org Received: (qmail 41319 invoked by uid 99); 29 Mar 2006 23:27:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Mar 2006 15:27:54 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Mar 2006 15:27:53 -0800 Received: from ajax (localhost.localdomain [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 35C306ACAA for ; Thu, 30 Mar 2006 00:27:32 +0100 (BST) Message-ID: <120367100.1143674852088.JavaMail.jira@ajax> Date: Thu, 30 Mar 2006 00:27:32 +0100 (BST) From: "Thorsten Berger (JIRA)" To: jetspeed-dev@jakarta.apache.org Subject: [jira] Commented: (JS2-479) Non-thread safe code in the DB PageManager In-Reply-To: <171505607.1138079650184.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/JS2-479?page=comments#action_12372339 ] Thorsten Berger commented on JS2-479: ------------------------------------- Hi Randy, I'm currently facing some problems with the non thread safety of the PageManager. My portal is creating a huge amount of folders and pages in one run with the PageManager API. The psmls are always created correctly, but the menu sometimes show the wrong values. They get sometimes not even refreshed by the FileCacheScanner, only restarting tomcat or rebuilding the folders and pages in another run helps. E.g. one excerpt from my code: pm.deepCopyFolder( navigationFolder, path, null ); Folder newFolder = pm.getFolder( path ); // set folder titles newFolder.setTitle( node.getName() ); newFolder.setShortTitle( node.getName() ); // folder menu definitions ..... pm.updateFolder( newFolder ); Sometimes the resulting folder still shows the old title (from the source folder) and not the subsequently set new title. I'm also seeing some ConcurrentModificationException in jetspeed.log: ................... 2006-03-30 01:03:16,151 [Thread-3] DEBUG org.apache.jetspeed.portalsite.impl.PortalSiteSessionContextImpl - Page manager update event, (node=/courses/WS0506/folder.metadata): set session context state stale 2006-03-30 01:03:16,151 [Thread-3] ERROR org.apache.jetspeed.cache.file.FileCache - FileCache Scanner: Error in iteration... java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:787) at java.util.HashMap$ValueIterator.next(HashMap.java:817) at org.apache.jetspeed.cache.file.FileCache$FileCacheScanner.run(FileCache.java:401) 2006-03-30 01:03:17,173 [Thread-3] DEBUG org.apache.jetspeed.page.document.psml.CastorFileSystemDocumentHandler - Entry is refreshing: folder.metadata ................... The ConcurrentModificationException could possibly be solved by using a cache Map with copy on write (COW) semantics as available in Java 1.5, but I still don't really overlook the implementation of the PageManager ;) Randy, is there a solution in sight? Thanks in advance, Thorsten P.S. the PageManager does a good job, esp. the declarative menus :) > Non-thread safe code in the DB PageManager > ------------------------------------------ > > Key: JS2-479 > URL: http://issues.apache.org/jira/browse/JS2-479 > Project: Jetspeed 2 > Type: Bug > Components: PSML > Versions: 2.1-dev > Reporter: Randy Watler > Assignee: Randy Watler > Priority: Critical > Fix For: 2.1-dev > > There are many places in the DB PageManager om implementation classes that are not thread safe, specifically in the transient data members used to wrap collections to work around OJB removal aware collection issues. > All of the DB PageManager component code needs to be tightened to address these potential issues. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org For additional commands, e-mail: jetspeed-dev-help@portals.apache.org