users@grizzly.java.net

PipelineThreadPool no longer available?

From: Parker Lord <plord_at_seecontrol.com>
Date: Mon, 14 Dec 2009 15:58:55 -0800 (PST)

So I just upgraded to 1.9.18-e to get the latest code in hopes to start
working on a buffer issue we have seen from time to time and noticed first
off that my code:


ExecutorService threadPool = new com.sun.grizzly.util.PipelineThreadPool();
controller.setThreadPool(threadPool);


no longer is valid.

So I changed it to:

ExecutorService threadPool = Executors.newCachedThreadPool();
controller.setThreadPool(threadPool);


Now when the ReadFilter gets invoked I get an exception:
SEVERE: ProtocolChain exception
java.lang.ClassCastException: java.lang.Thread
        at com.sun.grizzly.filter.ReadFilter.execute(ReadFilter.java:125)
        at com.sun.grizzly.filter.ReadFilter.execute(ReadFilter.java:105)
        at
com.sun.grizzly.filter.ParserProtocolFilter.superExecute(ParserProtocolFilter.java:210)
        at
com.sun.grizzly.filter.ParserProtocolFilter.execute(ParserProtocolFilter.java:134)
        at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)

What is the correct/best way to create the thread pool? I am building a
listener for remote cell modems which transmit an XML message.
-- 
View this message in context: http://old.nabble.com/PipelineThreadPool-no-longer-available--tp26780285p26780285.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.