<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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;private static final long serialVersionUID = 1L;<br>&nbsp;&nbsp;&nbsp; public static final String COMPONENT = &quot;component&quot;;
<br>@Override<br>public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {<br>&nbsp;// TODO Auto-generated method stub<br>&nbsp;super.doGet(request, response);<br>&nbsp;&nbsp;&nbsp; String command = 
request.getParameter(COMMAND);<br>&nbsp;&nbsp;&nbsp; if (command != null &amp;&amp; COMPONENT.equalsIgnoreCase(command)) {<br>&nbsp;&nbsp;PrintWriter writer = response.getWriter();<br>&nbsp;<br>&nbsp;&nbsp;try {<br>&nbsp;&nbsp;&nbsp;writer.write(&quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;S2 Components&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;pre&gt;&quot;);
<br>&nbsp;&nbsp;&nbsp;writer.flush();<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;S2Container s2 = getContainer();<br>&nbsp;&nbsp;&nbsp;int componentDefSize = s2.getComponentDefSize();<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;for (int i = 0; i &lt; componentDefSize; i++) {<br>&nbsp;&nbsp;&nbsp;&nbsp;ComponentDef cd = s2.getComponentDef
(i);<br>&nbsp;&nbsp;&nbsp;&nbsp;if (cd == null) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;ComponentDef: &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.write(cd.getComponentName() == null?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;&quot;:&quot;[&quot; +cd.getComponentName() + &quot;] &quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.write(cd.getComponentClass().getName());<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;Class[] classes = getAssignableClasses(cd.getComponentClass());<br>&nbsp;&nbsp;&nbsp;&nbsp;for (int j = 0; j &lt; classes.length; j++) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (classes[j].isInterface()) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;&nbsp;&nbsp;&nbsp; implements &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(classes[j].getName());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;for (int j = 0; j &lt; 
classes.length; j++) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!classes[j].isInterface()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp; !classes[j].equals(cd.getComponentClass())) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;&nbsp;&nbsp;&nbsp; extends&nbsp;&nbsp;&nbsp; &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(classes[j].getName());
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;&nbsp; autoBinding = &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.write(cd.getAutoBindingDef().getName());<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.write
(&quot;&nbsp; instanceMode = &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.write(cd.getInstanceDef().getName());<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.flush();<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;int argDefSize = cd.getArgDefSize
();<br>&nbsp;&nbsp;&nbsp;&nbsp;for (int j = 0; j &lt; argDefSize; j++) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArgDef ad = cd.getArgDef(j);<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;&nbsp; ArgDef: &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(String.valueOf(ad.getValue()));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.flush();<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;int propertyDefSize = cd.getPropertyDefSize();<br>&nbsp;&nbsp;&nbsp;&nbsp;for (int j = 0; j &lt; propertyDefSize; j++) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PropertyDef pd = cd.getPropertyDef(j);<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;&nbsp; PropertyDef: &quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(pd.getPropertyName());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot; = &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(String.valueOf(pd.getValue()));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.flush();<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;int initMethodDefSize = 
cd.getInitMethodDefSize();<br>&nbsp;&nbsp;&nbsp;&nbsp;for (int j = 0; j &lt; initMethodDefSize; j++) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InitMethodDef imd = cd.getInitMethodDef(j);<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;&nbsp; InitMethod: &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(imd.getMethodName
());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int imdArgDefSize = imd.getArgDefSize();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (int k = 0; k &lt; imdArgDefSize; k++) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArgDef ad = imd.getArgDef(k);<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;&nbsp;&nbsp;&nbsp; ArgDef: &quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(String.valueOf(ad.getValue()));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.flush();<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;int destroyMethodDefSize = cd.getDestroyMethodDefSize();<br>&nbsp;&nbsp;&nbsp;&nbsp;for (int j = 0; j &lt; destroyMethodDefSize; j++) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DestroyMethodDef dmd = cd.getDestroyMethodDef(j);<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;&nbsp; DestroyMethod: &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(dmd.getMethodName());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int imdArgDefSize = 
dmd.getArgDefSize();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (int k = 0; k &lt; imdArgDefSize; k++) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArgDef ad = dmd.getArgDef(k);<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;&nbsp;&nbsp;&nbsp; ArgDef: &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(String.valueOf(ad.getValue()));<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.flush();<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;int aspectDefSize = cd.getAspectDefSize();<br>&nbsp;&nbsp;&nbsp;&nbsp;for (int j = 0; j &lt; aspectDefSize; j++) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AspectDef ad = cd.getAspectDef
(j);<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;&nbsp; Aspect: &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(String.valueOf(ad.getExpression()));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;&nbsp;&nbsp;&nbsp; interceptor: &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write
(String.valueOf(ad.getAspect().getMethodInterceptor().getClass().getName()));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;&nbsp;&nbsp;&nbsp; pointcut: &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(String.valueOf(ad.getAspect().getPointcut()));
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.write(&quot;\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;writer.flush();<br>&nbsp;&nbsp;&nbsp;}<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;writer.write(&quot;&lt;/body&gt;&lt;/html&gt;&quot;);<br>&nbsp;&nbsp;} catch (Exception e) {<br>&nbsp;&nbsp;&nbsp;
e.printStackTrace(writer);<br>&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp; }<br>}<br>&nbsp;private static Class[] getAssignableClasses(Class componentClass) {<br>&nbsp;&nbsp;Set classes = new HashSet();<br>&nbsp;&nbsp;for (Class clazz = componentClass;<br>&nbsp;&nbsp;&nbsp;clazz != Object.class
 &amp;&amp; clazz != null;<br>&nbsp;&nbsp;&nbsp;clazz = clazz.getSuperclass()) {<br>&nbsp;&nbsp;&nbsp;classes.add(clazz);<br>&nbsp;&nbsp;&nbsp;Class[] interfaces = clazz.getInterfaces();<br>&nbsp;&nbsp;&nbsp;for (int i = 0; i &lt; interfaces.length; ++i) {<br>&nbsp;&nbsp;&nbsp;&nbsp;classes.add(interfaces[i]);
<br>&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;}<br>&nbsp;&nbsp;return (Class[]) classes.toArray(new Class[classes.size()]);<br>&nbsp;}<br>}</p></pre><pre><font face="Arial">$B;29M$^$G(B</font></pre></div>