I have a standalone Java application with threads that does some background processes while communicating to a MySQL database. This application runs 24/7 and has no issues with consistency. However I am looking for ways to optimize my application so that it can process faster.
My questions to you are:
1) Would my application run significantly faster if it was launched from the command line rather than running inside a Tomcat container?
2) Because I’m running a background application with no communications from website visitors is Tomcat even needed?
I don’t believe that Tomcat is my only bottleneck but I guess this is a good place to start.
Thank you and I look forward to your advice.
Author and all-around good cowpoke
posted 5 years ago
1. Naturally we would recommend that you measure time spent in various parts of the code with something like JAMON.
2. One advantage of continuing with Tomcat might be that you can write a administrate/monitoring interface for the application which can be accessed with a browser from anywhere on your network.
A tomcat that is not answering requests has very little to do so I doubt it influences your application speed.