[jboss-cvs] JBossAS SVN: r63552 - projects/microcontainer/trunk/docs/gettingstarted/src/docbkx/en/modules.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jun 18 10:33:24 EDT 2007
Author: alesj
Date: 2007-06-18 10:33:24 -0400 (Mon, 18 Jun 2007)
New Revision: 63552
Modified:
projects/microcontainer/trunk/docs/gettingstarted/src/docbkx/en/modules/javabeans.xml
Log:
Javabeans examples.
Modified: projects/microcontainer/trunk/docs/gettingstarted/src/docbkx/en/modules/javabeans.xml
===================================================================
--- projects/microcontainer/trunk/docs/gettingstarted/src/docbkx/en/modules/javabeans.xml 2007-06-18 13:10:13 UTC (rev 63551)
+++ projects/microcontainer/trunk/docs/gettingstarted/src/docbkx/en/modules/javabeans.xml 2007-06-18 14:33:24 UTC (rev 63552)
@@ -5,13 +5,86 @@
<section>
<title>Java beans</title>
- <para>JavaBeans ...
+ <para>In Container module there is a simple support for
+ <ulink url="http://java.sun.com/products/javabeans/">JavaBeans</ulink> configuration. When we have some existing
+ JavaBeans XML, we can easily port that bean configuration into Microcontainer beans configuration. Or if all we
+ really need is simple configuration, no dependency, JavaBeans configuration is enough. Let see this
+ in the examples below.
</para>
<programlisting>
- TODO ...
+ <javabean xmlns="urn:jboss:javabean:1.0" class="org.jboss.test.javabean.support.SimpleBean">
+ <property name="AString">StringValue</property>
+ <property name="AByte">12</property>
+ <property name="ABoolean">true</property>
+ <property name="AShort">123</property>
+ <property name="anInt">1234</property>
+ <property name="ALong">12345</property>
+ <property name="AFloat">3.14</property>
+ <property name="ADouble">3.14e12</property>
+ <property name="ADate">Jan 01 00:00:00 CET 2001</property>
+ <property name="ABigDecimal">12e4</property>
+ <property name="ABigInteger">123456</property>
+ <property name="abyte">12</property>
+ <property name="aboolean">true</property>
+ <property name="ashort">123</property>
+ <property name="anint">1234</property>
+ <property name="along">12345</property>
+ <property name="afloat">3.14</property>
+ <property name="adouble">3.14e12</property>
+ <property name="ANumber" class="java.lang.Long">12345</property>
+ <property name="overloadedProperty">StringValue</property>
+ <property name="XYZ">XYZ</property>
+ <property name="abc">abc</property>
+ </javabean>
</programlisting>
- <para>FooBar</para>
+ <para>Simple configuration via JavaBean setters.</para>
+ <programlisting>
+ <javabean xmlns="urn:jboss:javabean:2.0"
+ class="org.jboss.test.javabean.support.SimpleBean">
+ <constructor factoryClass="org.jboss.test.javabean.support.SimpleBeanFactory"
+ factoryMethod="newInstance">
+ <property name="anObject" class="java.lang.Object">anObjectValue</property>
+ <property name="AString">StringValue</property>
+ <property name="AByte">12</property>
+ <property name="ABoolean">true</property>
+ <property name="ACharacter">x</property>
+ <property name="AShort">123</property>
+ <property name="anInt">1234</property>
+ <property name="ALong">12345</property>
+ <property name="AFloat">3.14</property>
+ <property name="ADouble">3.14e12</property>
+ <property name="ADate">Jan 01 00:00:00 CET 2001</property>
+ <property name="ABigDecimal">12e4</property>
+ <property name="ABigInteger">123456</property>
+ <property name="abyte">12</property>
+ <property name="aboolean">true</property>
+ <property name="achar">y</property>
+ <property name="ashort">123</property>
+ <property name="anint">1234</property>
+ <property name="along">12345</property>
+ <property name="afloat">3.14</property>
+ <property name="adouble">3.14e12</property>
+ <property name="ANumber" class="java.lang.Long">12345</property>
+ <property name="overloadedProperty">StringValue</property>
+ <property name="XYZ">XYZ</property>
+ <property name="abc">abc</property>
+ </constructor>
+ </javabean>
+ </programlisting>
+
+ <para>Constructor configuration via factory class static method call.</para>
+
+ <programlisting>
+ <bean xmlns="urn:jboss:bean-deployer:2.0" class="org.jboss.acme.Example">
+ <property name="PropertyName">
+ <javabean xmlns="urn:jboss:javabean:1.0" class="org.jboss.test.kernel.deployment.xml.support.SerializableObject"/>
+ </property>
+ </bean>
+ </programlisting>
+
+ <para>You can use JavaBean with Microcontainer beans in all cases where you could use plain value.</para>
+
</section>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list