About Question enthuware.jwpv6.2.750 :

Moderator: admin

Post Reply
himaiMinh
Posts: 358
Joined: Fri Nov 29, 2013 8:26 pm
Contact:

About Question enthuware.jwpv6.2.750 :

Post by himaiMinh »

Hi,
I think foo can be thread safe.
It is a private instance.
There is no get method to access outside the CrazyServlet class.

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.750 :

Post by admin »

A servlet container can reuse the same servlet class instance for processing multiple requests simultaneously. So even if foo is private, multiple threads can execute the servlet's service method and access foo simulatenously.
-Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests