• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Glassfish: specify thread pool for a webapp

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the canonical way in Glassfish v2 to specify a thread pool for a specific application?

The Glassfish documentation is clear on how you create, edit and delete thread pools,
but say nothing on how you actually use them.

The default thread pool max size is 5, but there's (by default) another one named 'thread-pool-1'
with max size 200. I want to use that for my web/ejb3 app; I get thread starvation when several
clients simultaneously upload large files over a slow net.

Is that possible to specify via the Admin Console, or do you have to manually edit domain.xml?
Or do you need to specify that in some esotheric xml file in your webapp?

 
Per Lindberg
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After some investigation, it turns out that the thread pools that you can define in Glassfish can not be used for HTTP Request servicing. That is done by a hard-coded thread pool, which you can define in the Admin Console under Configuration > HTTP Service > RequestProcessing.

Here it is possible to increase 'Thread Count' from its default value 5 to some higher number (Tomcat has something like 150), or the max number of simultaneous slow requests, such as image upload over a slow net.

But note: each of the three HTTP listeners (8080, 8181, 4848) then will have its own service thread pool with this new size. (Foo!)

Hope this helps someone...

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic