users@grizzly.java.net

Re: WG: Re: WG: Re: WG: Re: WG: Re: Asynchronous Request Processing with TCPIP

From: John ROM <snake-john_at_gmx.de>
Date: Tue, 08 Jul 2008 11:33:22 +0200

Hi Jeanfrancois,

today I do not have much time so you might not hear from me.
I changed on sunday the samples to now use suspend.
Please find attached the new svn diffs.

Before I used com.sun.grizzly.filter.MessageContextImpl to hold a copy of some of Context members.

When you implemented Context.suspend I said to my self great I do not need the MessageContextImpl any more
and changed com.sun.grizzly.filter.MessageDispatcher#dispatch to now use Context.suspend and
Context.resume

When I now run com.sun.grizzly.standalone.framework.Main
I get every second time a NullPointer Exception. (see below netbeans output) because
Context.resume has been called to early.

I do not like my old MessageContextImpl because I think it is an unnessassary class but
on the other side coordination between WorkerThread and "normal" Threads is not
that easy........



Scanning for projects...
project-execute
[exec:exec]
Starting server on port :8077
------- useCaseSimpleLogin ---------------------------
Got seesion :479450812
------- useCaseEcho ---------------------------
ylzzirg ok : true
------- useCaseSubscribeFeed ---------------------------
------- useCaseEchoLargeMessages ---------------------------
Sending Messages 12500
Sending Messages 12500

Sending Messages 12500
java.lang.NullPointerException
        at com.sun.grizzly.BaseSelectionKeyHandler.postProcess(BaseSelectionKeyHandler.java:119)
        at com.sun.grizzly.SelectionKeyContextTask.afterCall(SelectionKeyContextTask.java:82)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
        at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:169)
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
Sending Messages 12500
stop

Mayn Greetings John


-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger