java - Webservice restricted to a single thread? -
today, while testing code slow (had wait data slow source) in restlet, noticed wildfly not allow me start additional threads, , run restlet in single thread well, meaning multiple connections had wait previous 1 finish.
oddly enough, using managedexecutorservice
, configured through urn:jboss:domain:ee:3.0
subsystem allow more threads still limited spawning 1 new thread, worked off requests sequentially.
have misunderstood how subsystem supposed work ? or restriction resteasy aspect somehow ? have in past used normal webservlets concurrency without experiencing behavior.
maybe problem on client side. how test code? have tried access rest service in wildfly 8.2 putting thread.sleep(5000)
in method. if i, example, open 2 tabs in firefox or chrome, 1 request processed concurrently, , takes 10 seconds . however, using firefox , chrom in parallel, both response in 5 seconds.
Comments
Post a Comment