[dna-issues] [JBoss JIRA] Commented: (DNA-456) Add JSR-170 Observation Optional Feature

Randall Hauch (JIRA) jira-events at lists.jboss.org
Fri Dec 4 02:39:29 EST 2009


    [ https://jira.jboss.org/jira/browse/DNA-456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12498199#action_12498199 ] 

Randall Hauch commented on DNA-456:
-----------------------------------

The build failed again in JcrObservationManagerTest, and so I re-ran the tests about 10x before I got the failure locally.  After some debugging, I noticed that when it failed, all of the missing events appear to be the last event, so I poked around the TestListener.waitForEvents() method, which calls 'await(...)' on a CountDownLatch that is decremented in the 'onEvent(...)' method.  The 'latch.countDown()' method was being called (and potentially the 'waitForEvents()' method returning) immediately after 'itr.nextEvent()' and before the event was added to the TestListener's state.  Of course, whether the 'waitForEvents()' method returns before or after the event info is added depends completely on thread scheduling.  This would explain how it frequently worked on some machines but frequently failed on others.

I put the whole content of the while loop in the 'onEvent(...)' method in a try-finally block, and moved the 'latch.countDown()' method to the finally.  I ran several tests locally with no failures, but I'll commit to see if they pass on the build box.

> Add JSR-170 Observation Optional Feature
> ----------------------------------------
>
>                 Key: DNA-456
>                 URL: https://jira.jboss.org/jira/browse/DNA-456
>             Project: DNA
>          Issue Type: Feature Request
>          Components: JCR
>    Affects Versions: 0.5
>            Reporter: Brian Carothers
>            Assignee: Dan Florian
>             Fix For: 0.7
>
>         Attachments: DNA-456-dna-graph.patch, DNA-456-dna-jcr.patch, DNA-456-dna-repository.patch, DNA-456-fix-concurrency-issues.patch
>
>
> JSR-170 defines several optional features.  The observation feature would provide notification of node and property changes to registered listeners.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the dna-issues mailing list