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 "Randy Watler (JIRA)" <je...@portals.apache.org> on 2006/01/24 06:14:10 UTC

[jira] Created: (JS2-479) Non-thread safe code in the DB PageManager

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
 Assigned to: 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


[jira] Resolved: (JS2-479) Non-thread safe code in the DB PageManager

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ate Douma resolved JS2-479.
---------------------------

       Resolution: Fixed
    Fix Version/s: 2.1

No problem reports anymore recently, considering it as fixed for now.

> Non-thread safe code in the DB PageManager
> ------------------------------------------
>
>                 Key: JS2-479
>                 URL: https://issues.apache.org/jira/browse/JS2-479
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: PSML
>    Affects Versions: 2.1-dev
>            Reporter: Randy Watler
>         Assigned To: Randy Watler
>            Priority: Critical
>             Fix For: 2.1, 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.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (JS2-479) Non-thread safe code in the DB PageManager

Posted by "Thorsten Berger (JIRA)" <je...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/JS2-479?page=comments#action_12372340 ] 

Thorsten Berger commented on JS2-479:
-------------------------------------

Oops, just noticed your commit yesterday ("fix multi-threading and session unloading bugs"). Does this solve this?

> 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


[jira] Commented: (JS2-479) Non-thread safe code in the DB PageManager

Posted by "Thorsten Berger (JIRA)" <je...@portals.apache.org>.
    [ 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


[jira] Commented: (JS2-479) Non-thread safe code in the DB PageManager

Posted by "Randy Watler (JIRA)" <je...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/JS2-479?page=comments#action_12372362 ] 

Randy Watler commented on JS2-479:
----------------------------------

Unfortunately, the recent patches will not help this newly found problem.

> 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