Does Java Based website / Application needs to be Multithreaded -
i beginner java, question if develop java web application (with spring framework) , business logic needs multithreded ? multiple people can hit application @ same time?
the java servlet api, through web server calls application, handles requests users using multiple threads. java web application by default multithreaded.
should business logic multithreaded? in situations, no. recommendation make business logic stateless, no mutable objects shared between different requests. otherwise need deal concurrency manually (because java web apps multithreaded), hard. common solution share state through database , rely on transaction isolation of database keep different requests conflicting.
Comments
Post a Comment