I think I understand your problem, but maybe a sample program would make things clearer...
On Mon, Feb 25, 2008 at 6:51 PM, Yigal Rachman <[EMAIL PROTECTED]> wrote: > 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 > > > ---------- Forwarded message ---------- > From: Yigal Rachman <[EMAIL PROTECTED]> > To: [email protected] > Date: Mon, 25 Feb 2008 14:51:57 -0800 > Subject: Mina 2 problem - InvalidMarkException in java.nio.Buffer > 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 > > > -- -------------------------------- Talent hits a target no one else can hit; Genius hits a target no one else can see.
