Issue Details (XML | Word | Printable)

Key: DIRSERVER-740
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Alex Karasulu
Reporter: Alex Karasulu
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

Re-enable thread pool max size parameter using new MINA executor

Created: 13/Sep/06 12:49 AM   Updated: 13/Sep/06 03:24 AM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Time Tracking:
Not Specified

Resolution Date: 13/Sep/06 03:24 AM


 Description  « Hide
Looks like there's no more ThreadPoolFilter in MINA and an Executor is used instead. I need to figure out from Trustin just how to set the max thread pool size now. I had to comment out some code in the ServerContextFactory on line 111 which needs to be re-enabled to allow for thread pool size configuration settings to hold.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Trustin Lee added a comment - 13/Sep/06 01:14 AM
Here's the example code:

ThreadPoolExecutor executor = new ThreadPoolExecutor();
// configure the executor here
...

SocketAcceptorConfig cfg = new SocketAcceptorConfig();
...

ExecutorThreadModel threadModel = ExecutorThreadModel.getInstance("LDAP");
threadModel.setExecutor( executor );
cfg.setThreadModel( threadModel );
...

acceptor.bind(new InetSocketAddress(port), handler, cfg);

You don't need to add any ExecutorFilter by yourself.

Alex Karasulu added a comment - 13/Sep/06 03:24 AM
Fixed on committed revision 442813:

    http://svn.apache.org/viewvc?view=rev&revision=442813