[jboss-cvs] JBossAS SVN: r89850 - projects/jboss-jca/trunk/doc/developerguide/en/modules.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jun 4 16:26:39 EDT 2009
Author: jesper.pedersen
Date: 2009-06-04 16:26:39 -0400 (Thu, 04 Jun 2009)
New Revision: 89850
Added:
projects/jboss-jca/trunk/doc/developerguide/en/modules/standalone.xml
Log:
[JBJCA-95] JBoss JCA/SJC
Added: projects/jboss-jca/trunk/doc/developerguide/en/modules/standalone.xml
===================================================================
--- projects/jboss-jca/trunk/doc/developerguide/en/modules/standalone.xml (rev 0)
+++ projects/jboss-jca/trunk/doc/developerguide/en/modules/standalone.xml 2009-06-04 20:26:39 UTC (rev 89850)
@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="standalone">
+ <title>Standalone</title>
+
+ <section id="jbossmc">
+ <title>JBoss Microcontainer</title>
+
+ </section>
+
+ <section id="jcasjc">
+ <title>JBoss JCA/SJC</title>
+ <warning>
+ This standalone configuration is for development purposes only.
+ </warning>
+
+ <para>The JBoss JCA/SJC is a small very simple way of bootstrapping the
+ JBoss JCA container where the configuration is done in a similar
+ way to the JBoss Microcontainer.</para>
+
+ <section id="jcasjc_layout">
+ <title>Layout</title>
+
+ <para>JBoss JCA/SJC has the following layout:</para>
+
+ <itemizedlist>
+ <listitem>
+ <code>$JBOSS_JCA_HOME/bin/</code>
+ <para>contains the run scripts and the SJC kernel.</para>
+ </listitem>
+ <listitem>
+ <code>$JBOSS_JCA_HOME/config/</code>
+ <para>contains the configuration of the container.</para>
+ </listitem>
+ <listitem>
+ <code>$JBOSS_JCA_HOME/deploy/</code>
+ <para>contains the user deployments.</para>
+ </listitem>
+ <listitem>
+ <code>$JBOSS_JCA_HOME/lib/</code>
+ <para>contains all the libraries used by the container.</para>
+ </listitem>
+ <listitem>
+ <code>$JBOSS_JCA_HOME/log/</code>
+ <para>contains the log files.</para>
+ </listitem>
+ <listitem>
+ <code>$JBOSS_JCA_HOME/tmp/</code>
+ <para>contains temporary files.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>To start the container execute the following</para>
+ <programlisting>
+cd $JBOSS_JCA_HOME/bin
+./run.sh
+ </programlisting>
+ <para>.</para>
+
+ </section>
+
+ <section id="jcasjc_configuration">
+ <title>Configuration</title>
+
+ <para>There is support for a single</para>
+ <programlisting>
+$JBOSS_JCA_HOME/config/boot.xml
+ </programlisting>
+ <para>file, where all the beans are initialized in the order they appear.</para>
+
+ <para>The layout of boot.xml is defined in</para>
+ <programlisting>
+$JBOSS_JCA_HOME/config/boot.xsd
+ </programlisting>
+
+ <para>In boot.xml there is support for the following constructs:</para>
+
+ <itemizedlist>
+ <listitem>
+ <code><bean></code>
+ <para>which initialize a bean based on the class attribute.</para>
+ </listitem>
+ <listitem>
+ <code><property></code>
+ <para>which sets a property on the bean - being an object or a primitive.</para>
+ </listitem>
+ <listitem>
+ <code><inject></code>
+ <para>injects a bean or a property from a bean.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>In order to define locations relative to the install root of the JBoss JCA
+ container the variable</para>
+ <programlisting>
+${jboss.jca.home}
+ </programlisting>
+ <para>can be used.</para>
+
+ <para>A configuration example would be</para>
+ <programlisting>
+<!-- Transaction manager -->
+<bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jta.TransactionManagerService">
+ <property name="transactionTimeout">300</property>
+ <property name="objectStoreDir">${jboss.jca.home}/tmp/tx-object-store</property>
+ <property name="mbeanServer"><inject bean="JMX" property="mbeanServer"/></property>
+ <property name="transactionStatusManagerInetAddress">localhost</property>
+ <property name="transactionStatusManagerPort">4713</property>
+ <property name="recoveryInetAddress">localhost</property>
+ <property name="recoveryPort">4712</property>
+ <property name="socketProcessIdPort">0</property>
+ </bean>
+ </programlisting>
+
+ </section>
+
+ <section id="jcasjc_lifecycle">
+ <title>Lifecycle</title>
+
+ <para>There is basic support for lifecycle methods. These include</para>
+
+ <itemizedlist>
+ <listitem>
+ <code>public void create()</code>
+ <para>Called after a bean has been constructed using its default constructor.</para>
+ </listitem>
+ <listitem>
+ <code>public void start()</code>
+ <para>Called after create.</para>
+ </listitem>
+ <listitem>
+ <code>public void stop()</code>
+ <para>Called when bean is stopped.</para>
+ </listitem>
+ <listitem>
+ <code>public void destroy()</code>
+ <para>Called after stop.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="jcasjc_classloading">
+ <title>Classloading</title>
+
+ <para>JBoss JCA/SJC features a simple 3-level classloader model:</para>
+
+ <orderedlist>
+ <listitem>
+ <para>Application classloader (AppCL).</para>
+ <para>Top-level classloader that loads the SJC kernel.</para>
+ </listitem>
+ <listitem>
+ <para>Container classloader (ConCL).</para>
+ <para>An URLClassLoader with AppCL as its parent which loads
+ all libraries used by the JBoss JCA container.</para>
+ </listitem>
+ <listitem>
+ <para>Deployment classloader (DCL).</para>
+ <para>Each deployment is running in its own classloader with
+ ConCL as its parent.</para>
+ </listitem>
+ </orderedlist>
+
+ </section>
+
+ <section id="jcasjc_deployers">
+ <title>Deployers</title>
+
+ <para>JBoss JCA/SJC features a very simple deployers mechanism.</para>
+
+ <para>Each deployer is defined as a bean in the boot.xml file and they
+ must implemenet the</para>
+ <programlisting>
+org.jboss.jca.sjc.deployers.Deployer
+ </programlisting>
+ <para>interface.</para>
+
+ <para>The interface contains the</para>
+ <programlisting>
+/**
+ * Deploy
+ * @param f The file
+ * @return The deployment; or null if no deployment was made
+ * @exception Exception Thrown if an error occurs
+ */
+public Deployment deploy(File f) throws Exception;
+ </programlisting>
+ <para>method which is invoked once with each of the files in the
+ $JBOSS_JCA_HOME/deploy/ directory.</para>
+
+ <para>The <code>Deployment</code> interface returned represents the
+ deployment unit or <code>null</code> if a deployment unit wasn't
+ created.</para>
+
+ </section>
+
+
+ </section>
+</chapter>
More information about the jboss-cvs-commits
mailing list