[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>
</bean></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't necessarily care which one provides it. To create these arbitrary objects you need to use the @Supply annotation or <supply> element.</para>
- <programlisting role="JAVA">@Supplies(@Supply("SomethingUseful"))
+ <programlisting role="JAVA">@Supply("SomethingUseful")
public class Provider {
...
}
@@ -2345,18 +2345,18 @@
<demand>SomethingUseful</demand>
</bean> </programlisting>
<para>A bean can also supply multiple objects if necessary:</para>
- <programlisting role="JAVA">@Supplies(@Supply("SomethingUseful"),
- @Supply("SomethingElse"))
+ <programlisting role="JAVA">@Supplys({@Supply("SomethingUseful"),
+ @Supply("SomethingElse")})
public class Provider {
...
}
- at Demands(@Demand("SomethingUseful"))
+ at Demands({@Demand("SomethingUseful")})
public class Consumer {
...
}
- at Demand(@Demand("SomethingElse"))
+ at Demand("SomethingElse")
public class OtherConsumer {
...
}</programlisting>
@@ -2372,7 +2372,7 @@
<bean name="OtherConsumer" class="com.acme.Consumer">
<demand>SomethingElse</demand>
</bean> </programlisting>
- <para>Behind the scenes JBoss Microcontainer creates a bean of type java.lang.Object for each @Supply annotation or <supply> 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 <demand> 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 <supply> 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 <demand> 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="true")
- public void halt() {
+ public void stop() {
...
}
}</programlisting>
<programlisting role="XML"><bean name="Name1" class="com.acme.Example">
- <start method="stop" ignored="true"/>
+ <stop method="stop" ignored="true"/>
</bean> </programlisting>
</section>
</chapter>
More information about the jboss-cvs-commits
mailing list