-
1. Re: How use AsynchronousServerSocketChannel with JCA 1.6 ?
jesper.pedersen Jun 4, 2013 7:12 AM (in response to rockerced)The executor services passed in to withCachedThreadPool should be wrapper for submitting Work instances to the WorkManager.
You could run your server socket in a Work instance too - I probably would...
See http://www.ironjacamar.org/doc/userguide/1.1/en-US/html/ch01.html#overview for your outbound/inbound architecture.
Otherwise let us know more details about your setup - but read the above first.
-
2. Re: How use AsynchronousServerSocketChannel with JCA 1.6 ?
rockerced Jun 6, 2013 4:04 AM (in response to jesper.pedersen)Thanks for your response,
I launch the server in a Work instance but i don't know how wrap Thread of the ThreadPool with the wor instance.
The ThreadPool manage lifecycle of Threads. How to wrap all the states of the life cycle of the thread with the WorkManager.
Do you have an example of an NIO.2 implementation ?Best regards
-
3. Re: How use AsynchronousServerSocketChannel with JCA 1.6 ?
jesper.pedersen Jun 6, 2013 2:00 PM (in response to rockerced)No, do a wrapper class that implements the ExecutorService interface, and take a WorkManager instance in its constructor.
Then the methods uses the WorkManager to execute whatever is passed in.
I would start the ServerSocket in the ResourceAdapter::start() method...
I don't have any NIO.2 examples.
HTH