Multiple Threads calling static helper method

前端 未结 7 652
孤街浪徒
孤街浪徒 2021-02-08 03:05

I have a web application running on Tomcat.

There are several calculations that need to be done on multiple places in the web application. Can I make those calculations

7条回答
  •  迷失自我
    2021-02-08 03:20

    If you are worried about synchronization and thread safety, don't use static helpers. Create a normal class with your helper methods and create an instance upon servlet request. Keep it simple :-)

提交回复
热议问题