After years of training I have their own small web site free of lossless music site with SSH you can see the WWW 360ape.com
First of all, what is called the single case mode bar:
How to make a class in Java, can only instantiate once. The
answer is: Single case mode.
the specific code is reflected in the public
class a{
Private A () {}//The constructor to private, other classes can no longer invoke the instantiated
Private static A Instance=new a ()//unique instance, plus static property
public static A getinstance () {//Other class calls the unique entry of a, also the static property, called by A.getinstance ()
return instance;
}
}
"The Struts1 action is a singleton pattern and must be thread-safe because only one instance of the action handles all requests." A single example strategy limits what Struts1 action can do, and is particularly cautious when developing. The action resource must be thread safe or synchronized.
Action execution Control: "STRUTS1 supports a separate request processors (lifecycle) for each module, but all the action in the module must share the same life cycle." "STRUTS2 supports creating a different lifecycle for each action through the Interceptor Stack (Interceptor Stacks). The stack can be used in conjunction with different action as needed.