|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
ch3.sharedVariable.error.Controller
ch3.sharedVariable.Controller
public class Controller
Extends the controller that has the shared error. The only method that is different is the incrementSharedVariable method.
| Field Summary |
|---|
| Fields inherited from class ch3.sharedVariable.error.Controller |
|---|
accessCount |
| Constructor Summary | |
|---|---|
Controller()
|
|
| Method Summary | |
|---|---|
void |
incrementSharedVariable()
Use a synchronized block to avoid the shared error. |
| Methods inherited from class ch3.sharedVariable.error.Controller |
|---|
doGet |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Controller()
| Method Detail |
|---|
public void incrementSharedVariable()
This method slows down the web app. A better solution is to avoid using member varialbes in the controller.
incrementSharedVariable in class Controller
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||