Storing ServletContext init param in <distributable> webapp
posted 7 years ago
In a distributed environment, which of the following is recommended for storing the initialization parameters pertaining to the Servlet Context?
a. The values of the Initialization parameters can be stored in the Application itself.
b. The values have to be externalized to other storage locations like database or a file.
c. The storage of the values to any location doesn't have any impact in a distributed environment.
d. None of the above.
In a distributed environment, it is also advisable to store the values of the initialization parameters in external storage (like database or file), because if stored at the Application level, it is not also guaranteed that all the Containers will always have the same state.
However I marked the answer as D since even external storage is not required. There is no such method as setInitParameter so whatever be the values they can't be different so will be automatically "in sync" owing to this very basic nature. What do you all think ??
SCJP 1.4 90%, SCWCD5 94%, Next SCDJWS--> In Naescent stage. Researching abt exam and material itself.