Re: svn commit: r643295 - in /cocoon/branches/BRANCH_2_1_X: src/java/org/apache/cocoon/components/flow/ContinuationsManager.java src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.jav

2008-04-01 Thread Joerg Heinicke

On 01.04.2008 02:21, [EMAIL PROTECTED] wrote:

Author: joerg
Date: Mon Mar 31 23:21:53 2008
New Revision: 643295

URL: http://svn.apache.org/viewvc?rev=643295view=rev
Log:
Fix synchronization issues in ContinuationsManager implementation.


Refactored version for 2.2 will follow this week ...

Joerg


[jira] Closed: (COCOON-2190) Add caching to corona

2008-04-01 Thread Reinhard Poetz (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Reinhard Poetz closed COCOON-2190.
--

Resolution: Fixed

applied. thanks!

 Add caching  to corona
 --

 Key: COCOON-2190
 URL: https://issues.apache.org/jira/browse/COCOON-2190
 Project: Cocoon
  Issue Type: New Feature
  Components: * Cocoon Core
Reporter: Steven Dolg
Assignee: Reinhard Poetz
 Attachments: caching.txt




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Assigned: (COCOON-2190) Add caching to corona

2008-04-01 Thread Reinhard Poetz (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Reinhard Poetz reassigned COCOON-2190:
--

Assignee: Reinhard Poetz

 Add caching  to corona
 --

 Key: COCOON-2190
 URL: https://issues.apache.org/jira/browse/COCOON-2190
 Project: Cocoon
  Issue Type: New Feature
  Components: * Cocoon Core
Reporter: Steven Dolg
Assignee: Reinhard Poetz
 Attachments: caching.txt




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: svn commit: r643293 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java

2008-04-01 Thread Vadim Gritsenko

On Apr 1, 2008, at 2:17 AM, [EMAIL PROTECTED] wrote:

fix threading issue (DateFormat is not thread-safe)

public String getLastAccessTime() {
-return formatter.format(new Date(wc.getLastAccessTime()));
+synchronized (this.formatter) {
+return formatter.format(new  
Date(wc.getLastAccessTime()));

+}
}


The better fix is to use FastDateFormat which features thread safe  
formatting.


Vadim


[jira] Updated: (COCOON-2190) Add caching to corona

2008-04-01 Thread Grzegorz Kossakowski (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grzegorz Kossakowski updated COCOON-2190:
-

Component/s: (was: * Cocoon Core)
 Corona (experimental)

 Add caching  to corona
 --

 Key: COCOON-2190
 URL: https://issues.apache.org/jira/browse/COCOON-2190
 Project: Cocoon
  Issue Type: New Feature
  Components: Corona (experimental)
Reporter: Steven Dolg
Assignee: Reinhard Poetz
 Attachments: caching.txt




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: [jira] Updated: (COCOON-2190) Add caching to corona

2008-04-01 Thread Grzegorz Kossakowski

Grzegorz Kossakowski (JIRA) pisze:

 [ 
https://issues.apache.org/jira/browse/COCOON-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grzegorz Kossakowski updated COCOON-2190:
-

Component/s: (was: * Cocoon Core)
 Corona (experimental)


As you see I've created Corona component in JIRA and updated this issue.

--
Grzegorz Kossakowski


Re: svn commit: r643293 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java

2008-04-01 Thread Joerg Heinicke

On 01.04.2008 08:02, Vadim Gritsenko wrote:


fix threading issue (DateFormat is not thread-safe)

public String getLastAccessTime() {
-return formatter.format(new Date(wc.getLastAccessTime()));
+synchronized (this.formatter) {
+return formatter.format(new Date(wc.getLastAccessTime()));
+}
}


The better fix is to use FastDateFormat which features thread safe 
formatting.


All these nice little gems hidden in Apache Commons libs :)

Applied.

Thanks,

Joerg


[jira] Commented: (COCOON-2109) Incorrent cleanup of expired continuations

2008-04-01 Thread JIRA

[ 
https://issues.apache.org/jira/browse/COCOON-2109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12584384#action_12584384
 ] 

Jörg Heinicke commented on COCOON-2109:
---

The threading issues in ContinuationsManagerImpl were fixed in rev 
http://svn.apache.org/viewvc?view=revrevision=643295 (with few changes from 
643294 necessary (WebContinuation is now Cloneable)).

 Incorrent cleanup of expired continuations
 --

 Key: COCOON-2109
 URL: https://issues.apache.org/jira/browse/COCOON-2109
 Project: Cocoon
  Issue Type: Bug
  Components: * Cocoon Core
Affects Versions: 2.1.11
Reporter: Miguel Cuervo
Assignee: Jörg Heinicke
 Fix For: 2.1.12-dev (Current SVN)

 Attachments: ContinuationsManagerImpl.java.patch


 The class ContinuationsManagerImpl is in charge of cleaning up expired 
 continuations. It does so in the method expireContinuations. In this method 
 there is a loop using an iterator over a SortedSet of continuations 
 (WebContinuation). The loop is expecting that the continuations are ordered 
 from oldest to newest.  The loop stops in the first continuation that is not 
 expired. The logic is correct since all the newer continuations could not be 
 expired.
 However, the problem comes from the ordering of the continuations. To have 
 the continuations ordered by lastAccessTime the program uses a TreeSet as a 
 container of the continuations. The continuations implement the compareTo 
 interface using the lastAccessTime and when a continuation is inserted in the 
 container, it gets correctly ordered. But after the insertion, the 
 continuation can change its lastAccessTime using the method 
 WebContinuation.updateLastAccessTime() called from 
 WebContinuation.getContinuation(). The ordering of the TreeSet is not updated 
 with the change and when the program iterates over it, it does not get the 
 continuations in the order expected.
 The result of this bug is that under hevy load many expired continuations may 
 be around before the loop actually clean them up, eating memory resources and 
 causing OutOfMemory.
 To fix it, a patch is provided that uses a HashSet for the continuations 
 container and loops over all the continuations to check if they have expired.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.