Hi everyone,
I'm trying out Esper 3.2.0 because we may want to include it in an offer
we are making to one of our customers. I'm trying to simulate a
CallCentre, receiving calls, waiting calls and calls being hung up by
the
caller.
The events I'm sending are very simple, CallWaiting, CallPickedUp and
CallFinished. All of them have a single property called "id" with a
unique
id for the call. I'm trying to count the number of waiting calls with
the
following EPL query:
insert into NumberOfWaitingCalls(calls)
select count(*)
from pattern[every call=CallWaiting ->
(not CallFinished(id=call.id) and
not CallPickedUp(id=call.id))]
This is supposed to publish an NumberOfWaitingCalls event whenever the
number of waiting calls changes. I want it to publish an event every 5
seconds, but can't quite figure out the syntax for that.
My problem is that whenever I send an event into Esper with the previous
statement active, I get the following Exception:
com.espertech.esper.client.EPException:
java.util.ConcurrentModificationException
at
com
.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:402)
at
com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:
380
)
at
com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:236)
at
nl
.progaiars.espertest.DocumentInputAdapter.handleDocument(DocumentInputAd
apter.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
pl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
at
org
.springframework.jms.listener.adapter.MessageListenerAdapter.invokeList
enerMethod(MessageListenerAdapter.java:466)
... 10 more
Caused by: java.util.ConcurrentModificationException
at
java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
at java.util.LinkedList$ListItr.next(LinkedList.java:696)
at
com
.espertech.esper.pattern.EvalAndStateNode.start(EvalAndStateNode.java:6
9)
at
com
.espertech.esper.pattern.EvalFollowedByStateNode.evaluateTrue(EvalFollo
wedByStateNode.java:111)
at
com
.espertech.esper.pattern.EvalEveryStateNode.evaluateTrue(EvalEveryState
Node.java:189)
at
com
.espertech.esper.pattern.EvalFilterStateNode.evaluateTrue(EvalFilterSta
teNode.java:90)
at
com
.espertech.esper.pattern.EvalFilterStateNode.matchFound(EvalFilterState
Node.java:148)
at
com
.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRunt
imeImpl.java:1031)
at
com
.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:8
24)
at
com
.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:398)
... 19 more
I think it must be something in the expression, because when I remove
this
statement from Esper, everything works fine (I have a few other
statements
as well). When I remove all statements except for the one mentioned
above,
the exception still happens. I'm using JMS to put the messages into
Esper
and I'm using only a single thread for the entire application.
Can anyone help me figure out what's going on or what I'm doing wrong?
Best regards,
Gerco Dries.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email