Hi, Folks:
I am thinking that the synchronizing bug is almost certainly in my
application code. Said application uses the Timer class to invoke some
asynchronous processing. The methods are all synchronized, but probably
on the wrong instance! So my follow-up question is: If I need to ensure
that another thread does not conflict with a Mina thread, how do I
synchronize it?
Yigal Rachman
--- Begin Message ---
Hi, Folks:
I am biting the bullet and porting to Mina 2.0.0-M1. Thus far, I seem
to have resolved all the changes without much pain. I love the look of
the revised Mina - elegant and even simpler to use - wow!
I have, however, run into a problem which appears to come from the
bowels of Mina. Here is the exception I am seeing:
java.nio.InvalidMarkException
at java.nio.Buffer.reset(Unknown Source)
at
org.apache.mina.common.AbstractIoBuffer.reset(AbstractIoBuffer.java:321)
at
org.apache.mina.common.AbstractPollingIoProcessor.writeBuffer(AbstractPollingIoProcessor.java:577)
at
org.apache.mina.common.AbstractPollingIoProcessor.flushNow(AbstractPollingIoProcessor.java:528)
at
org.apache.mina.common.AbstractPollingIoProcessor.flush(AbstractPollingIoProcessor.java:469)
at
org.apache.mina.common.AbstractPollingIoProcessor.access$500(AbstractPollingIoProcessor.java:43)
at
org.apache.mina.common.AbstractPollingIoProcessor$Worker.run(AbstractPollingIoProcessor.java:681)
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The message is clear enough: no mark has been set on the buffer, so a
reset is not possible. But it does look fishy.. perhaps a thread that
is not properly synchronized? Ideas, anyone?
Thank you all for your continuing help.
Yigal Rachman
--- End Message ---