Jersey creates one thread per request. Is it possible to limit number of threads created on server side in Jersey Restful Web Services?
Firstly, i created a resource containing 4 methods viz., create, update, delete, read to perform operations on database.
Then i wrote a shell script which creates 10 process asynchronously and each process performs 100 sets(1 set = Create() + Update()+ delete() + read()) of CURD operations using cURL requests which were not asynchronous as i had to calculate total time taken for each cURL request.
I got result as:
Total time taken by 10 processes to complete is: 989.733 seconds
Average time of 10 processes is: 98.97330 seconds
When i increased the number of CURD sets to 4000, it failed. Then, i have created a resource which contains async method getData() in Jersey REST for better performance. Now, i intend to limit the number of threads created on server side in Jersey REST irrespective of number of requests fired from client side. Is it possible? Thanks in advance.