Hi Every one,
I have a web application which requests a jasper export of the UI content (Single page app) with the click of an I icon on the web page the requests gets to a REST end point that takes the request and calls a spring processor class with a request object. The Processor class is a spring singleton scoped bean which calls an extended class’s report fill method which actually makes the db call to fill the jasper report after which the response is routed and the browser gets back the exported file. As the number of requests goes up I was thinking of implementing some sort of
thread pool to hold incoming requests from the web in this processor and allow only limited set of threads to execute at any time as the number of records for each export can be quite big, after looking around I hit up on org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor. I am injecting taskexecutor into the processor class. My question is how do I get access to incoming thread requests and how to use taskexecutor. I am assuming
will pull in coming threads and putting them in taskExecutor
will make restrictions to start to kick in using settings. I am right? Please correct me if I am wrong Thanks in advance.