portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thorsten Berger (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Commented: (JS2-479) Non-thread safe code in the DB PageManager
Date Wed, 29 Mar 2006 23:27:32 GMT
    [ 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


Mime
View raw message