<div>$B;VB<$G$9!#(B</div>
<div>S2Container$B$b(BHotdeploy$B$HF1$8@_Dj$GF0$/(B Cooldeploy$B$,Ds6!$5$l$F!"BgJQ8zN(E*(B</div>
<div>$B$K3+H/=PMh$k4D6-$K$J$j$^$7$?!#(B</div>
<div> </div>
<div>$B0MA3(B Suga$B$5$s$,!"(BBlog$B$K=q$+$l$F$$$?(B S2servlet$B$G(BComponent$B$NEPO?I=<($r$9$kJQ99$r(B</div>
<div>$B$[$H$s$I$=$N$^$^$G$9$,!"(BCooldeploy$B4D6-$G;HMQ$9$k$HBgJQJXMx$G$7$?$N$GJs9p$7$^$9!#(B</div>
<div> </div>
<div><a href="http://localhost:8080/test/s2servlet?command=component">http://localhost:8080/test/s2servlet?command=component</a>$B$N$h$&$KF~NO$9$k$H(B</div>
<div> </div>
<div>S2ContainerServlet is running.<pre>ComponentDef: [homePage] com.shimura.page.HomePage
extends net.sf.click.Page
autoBinding = auto
instanceMode = request
Aspect: org.seasar.framework.container.ognl.OgnlExpression@12088db
interceptor: org.seasar.framework.aop.interceptors.TraceInterceptor
pointcut: org.seasar.framework.aop.impl.PointcutImpl@f90137
ComponentDef: [newLogic] com.shimura.page.impl.NewLogicImpl
implements com.shimura.page.NewLogic
autoBinding = auto
instanceMode = prototype
Aspect: org.seasar.framework.container.ognl.OgnlExpression@1bed3d1
interceptor: org.seasar.framework.aop.interceptors.TraceInterceptor
pointcut: null
ComponentDef: [test3Logic] com.shimura.test.logic.impl.Test3LogicImpl
implements com.shimura.test.logic.Test3Logic
autoBinding = auto
instanceMode = prototype
Aspect: org.seasar.framework.container.ognl.OgnlExpression@1444356
interceptor: org.seasar.framework.aop.interceptors.TraceInterceptor
pointcut: null
</pre><pre>$B$NMM$KI=<($5$l$^$9!#(B</pre><pre>Source$B$O(B</pre><pre><p>public class ModS2ContainerServlet extends S2ContainerServlet {</p><p><br> private static final long serialVersionUID = 1L;<br> public static final String COMPONENT = "component";
<br>@Override<br>public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {<br> // TODO Auto-generated method stub<br> super.doGet(request, response);<br> String command =
request.getParameter(COMMAND);<br> if (command != null && COMPONENT.equalsIgnoreCase(command)) {<br> PrintWriter writer = response.getWriter();<br> <br> try {<br> writer.write("<html><head><title>S2 Components</title></head><body><pre>");
<br> writer.flush();<br> <br> S2Container s2 = getContainer();<br> int componentDefSize = s2.getComponentDefSize();<br> <br> for (int i = 0; i < componentDefSize; i++) {<br> ComponentDef cd = s2.getComponentDef
(i);<br> if (cd == null) {<br> continue;<br> }<br> <br> writer.write("ComponentDef: ");<br> writer.write(cd.getComponentName() == null?<br> "":"[" +cd.getComponentName() + "] ");
<br> writer.write(cd.getComponentClass().getName());<br> writer.write("\n");<br> <br> Class[] classes = getAssignableClasses(cd.getComponentClass());<br> for (int j = 0; j < classes.length; j++) {
<br> if (classes[j].isInterface()) {<br> writer.write(" implements ");<br> writer.write(classes[j].getName());<br> writer.write("\n");<br> }<br> }<br> for (int j = 0; j <
classes.length; j++) {<br> if (!classes[j].isInterface()<br> && !classes[j].equals(cd.getComponentClass())) {<br> writer.write(" extends ");<br> writer.write(classes[j].getName());
<br> writer.write("\n");<br> }<br> }<br> <br> writer.write(" autoBinding = ");<br> writer.write(cd.getAutoBindingDef().getName());<br> writer.write("\n");<br> writer.write
(" instanceMode = ");<br> writer.write(cd.getInstanceDef().getName());<br> writer.write("\n");<br> writer.write("\n");<br> writer.flush();<br> <br> int argDefSize = cd.getArgDefSize
();<br> for (int j = 0; j < argDefSize; j++) {<br> ArgDef ad = cd.getArgDef(j);<br> <br> writer.write(" ArgDef: ");<br> writer.write(String.valueOf(ad.getValue()));<br> writer.write("\n");
<br> }<br> writer.flush();<br> <br> int propertyDefSize = cd.getPropertyDefSize();<br> for (int j = 0; j < propertyDefSize; j++) {<br> PropertyDef pd = cd.getPropertyDef(j);<br> <br> writer.write(" PropertyDef: ");
<br> writer.write(pd.getPropertyName());<br> writer.write(" = ");<br> writer.write(String.valueOf(pd.getValue()));<br> writer.write("\n");<br> }<br> writer.flush();<br> <br> int initMethodDefSize =
cd.getInitMethodDefSize();<br> for (int j = 0; j < initMethodDefSize; j++) {<br> InitMethodDef imd = cd.getInitMethodDef(j);<br> <br> writer.write(" InitMethod: ");<br> writer.write(imd.getMethodName
());<br> writer.write("\n");<br> int imdArgDefSize = imd.getArgDefSize();<br> for (int k = 0; k < imdArgDefSize; k++) {<br> ArgDef ad = imd.getArgDef(k);<br> <br> writer.write(" ArgDef: ");
<br> writer.write(String.valueOf(ad.getValue()));<br> writer.write("\n");<br> }<br> }<br> writer.flush();<br> <br> int destroyMethodDefSize = cd.getDestroyMethodDefSize();<br> for (int j = 0; j < destroyMethodDefSize; j++) {
<br> DestroyMethodDef dmd = cd.getDestroyMethodDef(j);<br> <br> writer.write(" DestroyMethod: ");<br> writer.write(dmd.getMethodName());<br> writer.write("\n");<br> int imdArgDefSize =
dmd.getArgDefSize();<br> for (int k = 0; k < imdArgDefSize; k++) {<br> ArgDef ad = dmd.getArgDef(k);<br> <br> writer.write(" ArgDef: ");<br> writer.write(String.valueOf(ad.getValue()));<br>
writer.write("\n");<br> }<br> }<br> writer.flush();<br> <br> int aspectDefSize = cd.getAspectDefSize();<br> for (int j = 0; j < aspectDefSize; j++) {<br> AspectDef ad = cd.getAspectDef
(j);<br> <br> writer.write(" Aspect: ");<br> writer.write(String.valueOf(ad.getExpression()));<br> writer.write("\n");<br> writer.write(" interceptor: ");<br> writer.write
(String.valueOf(ad.getAspect().getMethodInterceptor().getClass().getName()));<br> writer.write("\n");<br> writer.write(" pointcut: ");<br> writer.write(String.valueOf(ad.getAspect().getPointcut()));
<br> writer.write("\n");<br> }<br> <br> writer.write("\n");<br> writer.flush();<br> }<br> <br> writer.write("</body></html>");<br> } catch (Exception e) {<br>
e.printStackTrace(writer);<br> }<br> }<br>}<br> private static Class[] getAssignableClasses(Class componentClass) {<br> Set classes = new HashSet();<br> for (Class clazz = componentClass;<br> clazz != Object.class
&& clazz != null;<br> clazz = clazz.getSuperclass()) {<br> classes.add(clazz);<br> Class[] interfaces = clazz.getInterfaces();<br> for (int i = 0; i < interfaces.length; ++i) {<br> classes.add(interfaces[i]);
<br> }<br> }<br> return (Class[]) classes.toArray(new Class[classes.size()]);<br> }<br>}</p></pre><pre><font face="Arial">$B;29M$^$G(B</font></pre></div>