[jboss-cvs] JBossAS SVN: r90091 - projects/microcontainer/mcdocs/trunk/userguide/src/main/docbook.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 11 10:31:19 EDT 2009


Author: kabir.khan at jboss.com
Date: 2009-06-11 10:31:19 -0400 (Thu, 11 Jun 2009)
New Revision: 90091

Modified:
   projects/microcontainer/mcdocs/trunk/userguide/src/main/docbook/User_Guide.xml
Log:
Better ignore stop example

Modified: projects/microcontainer/mcdocs/trunk/userguide/src/main/docbook/User_Guide.xml
===================================================================
--- projects/microcontainer/mcdocs/trunk/userguide/src/main/docbook/User_Guide.xml	2009-06-11 13:25:04 UTC (rev 90090)
+++ projects/microcontainer/mcdocs/trunk/userguide/src/main/docbook/User_Guide.xml	2009-06-11 14:31:19 UTC (rev 90091)
@@ -2328,7 +2328,7 @@
     <demand>OtherBean</demand>
 &lt;/bean&gt;</programlisting>
         <para>In addition to specifying dependencies on other beans you can also specify dependencies on arbitrary objects that other beans supply. This can be useful if a bean depends on something  that is provided by multiple beans but doesn&apos;t necessarily care which one provides it. To create these arbitrary objects you need to use the @Supply annotation or &lt;supply&gt; element.</para>
-        <programlisting role="JAVA">@Supplies(@Supply(&quot;SomethingUseful&quot;))
+        <programlisting role="JAVA">@Supply(&quot;SomethingUseful&quot;)
 public class Provider {
     ...
 }
@@ -2345,18 +2345,18 @@
     &lt;demand&gt;SomethingUseful&lt;/demand&gt;
 &lt;/bean&gt; </programlisting>
         <para>A bean can also supply multiple objects if necessary:</para>
-        <programlisting role="JAVA">@Supplies(@Supply(&quot;SomethingUseful&quot;),
-          @Supply(&quot;SomethingElse&quot;))
+        <programlisting role="JAVA">@Supplys({@Supply(&quot;SomethingUseful&quot;),
+          @Supply(&quot;SomethingElse&quot;)})
 public class Provider {
     ...
 }
 
- at Demands(@Demand(&quot;SomethingUseful&quot;))
+ at Demands({@Demand(&quot;SomethingUseful&quot;)})
 public class Consumer {
     ...
 }
 
- at Demand(@Demand(&quot;SomethingElse&quot;))
+ at Demand(&quot;SomethingElse&quot;)
 public class OtherConsumer {
     ...
 }</programlisting>
@@ -2372,7 +2372,7 @@
 &lt;bean name=&quot;OtherConsumer&quot; class=&quot;com.acme.Consumer&quot;&gt;
     &lt;demand&gt;SomethingElse&lt;/demand&gt;
 &lt;/bean&gt; </programlisting>
-        <para>Behind the scenes JBoss Microcontainer creates a bean of type java.lang.Object for each @Supply annotation or &lt;supply&gt; element named after its value. These beans are then moved automatically through all of the states to reach the INSTALLED state and become deployed. From this point onwards the @Demand annotation and &lt;demand&gt; element work in exactly the same way as before, checking to see if the named bean has been deployed before allowing the bean declaring the demand/s to move to a certain state.</para>
+        <para>Behind the scenes JBoss Microcontainer creates a bean of type java.lang.Object for each @Supply annotation or &lt;supply&gt; element named after its value. These beans are then moved automatically through all of the states to reach the INSTALLED state and become deployed. From this point onwards the @Demand annotation and &lt;demand&gt; element work in exactly the same way as before, checking to see if the named bean has been deployed before allowing the bean declaring the demands to move to a certain state.</para>
       </section>
       <section>
         <title>Service dependencies</title>
@@ -2659,12 +2659,12 @@
         <para>Sometimes you may want lifecycle methods to be ignored. This can be done using the <code>ignore</code> attribute which if set to true prevents the microcontainer from calling the method when the corresponding lifecycle stage is reached.</para>
         <programlisting role="JAVA">public class Example {
     @Stop(ignored=&quot;true&quot;)
-    public void halt() {
+    public void stop() {
         ...
     }
 }</programlisting>
         <programlisting role="XML">&lt;bean name=&quot;Name1&quot; class=&quot;com.acme.Example&quot;&gt;
-    &lt;start method=&quot;stop&quot; ignored=&quot;true&quot;/&gt;
+    &lt;stop method=&quot;stop&quot; ignored=&quot;true&quot;/&gt;
 &lt;/bean&gt; </programlisting>
       </section>
     </chapter>




More information about the jboss-cvs-commits mailing list