tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Canfield (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAP5-1557) ConcurrentModificationException in PersistentFieldManagerImpl
Date Sat, 25 Jun 2011 20:45:47 GMT

    [ https://issues.apache.org/jira/browse/TAP5-1557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13054968#comment-13054968
] 

Josh Canfield commented on TAP5-1557:
-------------------------------------

Calls to Session.getAttributeNames is not thread safe in all application server session implementations.

The above exception looks like it's being run in Tomcat 5.5 because the session attributes
are being stored in a Hashtable. In Tomcat 6 this should be gone because the session attributes
are stores in an ConcurrentHashMap.

Jetty 7 is using a HashMap so it's probably still going to be a problem there.

AbstractSessionPersistentFieldStrategy uses getAttributeNames in two places which could possibly
be removed by inspecting the page/components instead of the session.


> ConcurrentModificationException in PersistentFieldManagerImpl
> -------------------------------------------------------------
>
>                 Key: TAP5-1557
>                 URL: https://issues.apache.org/jira/browse/TAP5-1557
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.0, 5.2.5
>            Reporter: Josh Canfield
>            Assignee: Josh Canfield
>
> Caused by: java.util.ConcurrentModificationException
>  at java.util.Hashtable$Enumerator.next(Hashtable.java:1031)
>  at org.apache.catalina.util.Enumerator.<init>(Enumerator.java:101)
>  at org.apache.catalina.util.Enumerator.<init>(Enumerator.java:67)
>  at org.apache.catalina.cluster.session.DeltaSession.getAttributeNames(DeltaSession.java:1046)
>  at org.apache.catalina.cluster.session.DeltaSessionFacade.getAttributeNames(DeltaSessionFacade.java:121)
>  at org.apache.tapestry5.internal.services.SessionImpl.getAttributeNames(SessionImpl.java:77)
>  at org.apache.tapestry5.internal.services.AbstractSessionPersistentFieldStrategy.gatherFieldChanges(AbstractSessionPersistentFieldStrategy.java:55)
>  at org.apache.tapestry5.internal.services.PersistentFieldManagerImpl.gatherChanges(PersistentFieldManagerImpl.java:62)
>  at $PersistentFieldManager_12fe8a643a9.gatherChanges($PersistentFieldManager_12fe8a643a9.java)
>  at org.apache.tapestry5.internal.structure.PageImpl.getFieldChange(PageImpl.java:206)
>  at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.getFieldChange(InternalComponentResourcesImpl.java:176)
>  at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.hasFieldChange(InternalComponentResourcesImpl.java:186)
>  at org.apache.tapestry5.internal.transform.PersistWorker$PersistentFieldConduit.restoreStateAtPageAttach(PersistWorker.java:80)
>  at org.apache.tapestry5.internal.transform.PersistWorker$PersistentFieldConduit.access$000(PersistWorker.java:38)
>  at org.apache.tapestry5.internal.transform.PersistWorker$PersistentFieldConduit$1.restoreStateBeforePageAttach(PersistWorker.java:61)
>  at org.apache.tapestry5.internal.structure.PageImpl.attached(PageImpl.java:184)
>  at org.apache.tapestry5.internal.services.NonPoolingRequestPageCacheImpl.get(NonPoolingRequestPageCacheImpl.java:78)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message