fact : servlet container creates one instance per servlet(hope i am correct on this fact)
quest: if suppose 2 requests are sent to the same servlet to update the x column in table Y for same record
will the value sent by one request is going to be overriden by other request ?
how this is handled, will the container is going to handle it by itself or ?
please reply
fact : servlet container creates one instance per servlet(hope i am correct on this
Share
Not guaranteed, but usually true. So more an assumption than a fact.
This is up to the database, not the servlet container. There will be two threads using the same servlet instance, each with their own database connection.
But yes of course, the second request will overwrite the database value put there by the first request. Not sure how else you’d expect this to work.