On 2/17/07, Nestor Urquiza <[EMAIL PROTECTED]> wrote:
Hi Rahul,

I was going to answer it was going to be hard to
provide such a JUnit test case since this situation
was happening randomly ...

<snip/>

I know, but the act of producing the test is helpful to the cause ;-)


I found a bug in my program ... I forgot to
synchronize my data model caching and being a web
application when hit by several users it was possible
for the iterator to find an inconsistency when another
thread modified the collection while iterating.

<snap/>

That seems in line with the trace you posted. The implementation
assumes that the object model representing the state machine is
immutable, which is a fair assumption if its read from a SCXML
document. However, if at any point, you're programmatically
manipulating objects from the org.apache.commons.scxml.model package
(such as Datamodel, in this case), that assumption doesn't hold. While
it is possible to do quite interesting stuff with such "adaptive"
state machines (where more than the Datamodel is manipulated), there
will be a definite need for synchronization in these situations.

-Rahul



I hope it will solve the problem. Jakarta Jmeter and
Eclipse together were the tools that help me figure
the problem out btw.

Thanks,

-Nestor

--- Rahul Akolkar <[EMAIL PROTECTED]> wrote:

> On 2/15/07, Nestor Urquiza <[EMAIL PROTECTED]>
> wrote:
> > Hi guys,
> > Are any of you experiementing the below?
> >
> <snip/>
>
> The trace is clear, the scenario is not. Can you
> please provide the
> smallest complete JUnit test case that reproduces
> this? Thanks!
>
> -Rahul
>
>
>
> > java.util.ConcurrentModificationException
> >         at
> >
>
java.util.AbstractList$Itr.checkForComodification(AbstractList.java:448)
> >         at
> >
>
java.util.AbstractList$Itr.next(AbstractList.java:419)
> >         at
> >
>
org.apache.commons.scxml.SCXMLHelper.cloneDatamodel(SCXMLHelper.java:441)
> >         at
> >
>
org.apache.commons.scxml.SCXMLExecutor.reset(SCXMLExecutor.java:223)
> >         at
> >
>
org.apache.commons.scxml.SCXMLExecutor.go(SCXMLExecutor.java:341)
> >
> > Thanks,
> >
> > -Nestor
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to