[jboss-svn-commits] JBL Code SVN: r35398 - in labs/jbosstm/trunk/ArjunaCore/docs: ArjunaCore_Development_Guide/en-US and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Oct 4 02:52:53 EDT 2010


Author: misty at redhat.com
Date: 2010-10-04 02:52:52 -0400 (Mon, 04 Oct 2010)
New Revision: 35398

Added:
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Class_Definitions.xml
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Object_Store_Implementations.xml
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Configuration_Options.xml
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Constructing_A_Transactional_Objects_For_Java_Application.xml
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Development_Guide.xml
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/AtomicAction_class.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/EnvironmentBeans.xml
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/LockManager_class.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/OutputBuffer_class.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/OutputObjectState_class.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/StateManager_class.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/Uid_class.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/appendix_StateStatus.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/defaultTimeout.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/default_layout.txt
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-TransactionalQueue.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_enqueue.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_inspectValue.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_main.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_queueSize.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_restore_state.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_save_state.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_type.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example_queue_class.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example_queue_destructor.java
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/jdbcaccess.java
Removed:
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Class_Definitions.xml
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Object_Store_Implementations.xml
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Configuration_Options.xml
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Constructing_A_Transactional_Objects_For_Java_Application.xml
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Development_Guide.xml
   labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/LockManager_class.java
Log:
Moving ArjunaCore Development Guide to the same location as the Installation Guide and Administration Guide

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide (from rev 35391, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide)

Deleted: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Class_Definitions.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Appendix_Class_Definitions.xml	2010-10-02 15:00:03 UTC (rev 35391)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Class_Definitions.xml	2010-10-04 06:52:52 UTC (rev 35398)
@@ -1,69 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "ArjunaCore_Development_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<appendix>
-  <title>Class definitions</title>
-  <para>
-
-  </para>
-  <section>
-    <title><classname>LockManager</classname></title>
-    <para>
-
-    </para>
-  </section>
-
-  
-  <section>
-    <title><classname>StateManager</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
-  <section>
-    <title><classname>InputObjectState</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
-  <section>
-    <title><classname>OutputObjectState</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
-  <section>
-    <title><classname>InputBuffer</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
-  <section>
-    <title><classname>OutputBuffer</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
-  <section>
-    <title><classname>Uid</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
-  <section>
-    <title><classname>AtomicAction</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
-</appendix>
-

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Class_Definitions.xml (from rev 35397, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Appendix_Class_Definitions.xml)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Class_Definitions.xml	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Class_Definitions.xml	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,45 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "ArjunaCore_Development_Guide.ent">
+%BOOK_ENTITIES;
+]>
+<appendix>
+  <title>Class definitions</title>
+  <para>
+    This appendix contains an overview of those classes that the application programmer will typically use. The aim of
+    this appendix is to provide a quick reference guide to these classes for use when writing applications in
+    TxCore. For clarity only the public and protected interfaces of the classes will be given.
+  </para>
+
+  <example>
+    <title>Class <classname>LockManager</classname></title>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/LockManager_class.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+  </example>
+
+    <example>
+    <title>Class <classname>StateManager</classname></title>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/StateManager_class.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+  </example>
+
+    <example>
+      <title>Classes <classname>OutputObjectState</classname> and <classname>InputObjectState</classname></title>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/OutputObjectState_class.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+  </example>
+
+    <example>
+      <title>Classes <classname>OutputBuffer</classname> and <classname>InputBuffer</classname></title>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/OutputBuffer_class.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+  </example>
+
+    <example>
+    <title>Class <classname>Uid</classname></title>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/Uid_class.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+  </example>
+
+    <example>
+    <title>Class <classname>AtomicAction</classname></title>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/AtomicAction_class.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+  </example>
+
+</appendix>
+

Deleted: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Object_Store_Implementations.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Appendix_Object_Store_Implementations.xml	2010-10-02 15:00:03 UTC (rev 35391)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Object_Store_Implementations.xml	2010-10-04 06:52:52 UTC (rev 35398)
@@ -1,88 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "ArjunaCore_Development_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<appendix>
-  <title>Object store implementations</title>
-  <para>
-
-  </para>
-  <section>
-    <title>The ObjectStore</title>
-    <para>
-
-    </para>
-
-    
-    <section>
-      <title>Persistent object stores</title>
-      <para>
-        
-      </para>
-
-    </section>    
-    <section>
-      <title>Common functionality</title>
-      <para>
-        
-      </para>
-      
-    </section>
-    
-    <section>
-      <title>The shadowing store</title>
-      <para>
-        
-      </para>
-      
-    </section>
-
-    
-    <section>
-      <title>No file-level locking</title>
-      <para>
-        
-      </para>
-      
-    </section>
-    
-    <section>
-      <title>The hashed store</title>
-      <para>
-        
-      </para>
-      
-    </section>
-
-    
-    <section>
-      <title>The JDBC store</title>
-      <para>
-        
-      </para>
-      
-    </section>
-    
-    <section>
-      <title>The cached store</title>
-      <para>
-        
-      </para>
-      
-    </section>
-
-    
-    <section>
-      <title>LogStore</title>
-      <para>
-        
-      </para>
-      
-    </section>
-
-
-  </section>
-
-</appendix>
-

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Object_Store_Implementations.xml (from rev 35396, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Appendix_Object_Store_Implementations.xml)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Object_Store_Implementations.xml	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Appendix_Object_Store_Implementations.xml	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,307 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "ArjunaCore_Development_Guide.ent">
+%BOOK_ENTITIES;
+]>
+<appendix>
+  <title>Object store implementations</title>
+  <para>
+
+  </para>
+  <section>
+    <title>The ObjectStore</title>
+    <para>
+      This appendix examines the various TxCore object store implementations and gives guidelines for creating other
+      implementations and plugging into an application.
+    </para>
+    <para>
+      This release of JBoss Transaction Service contains several different implementations of a basic object store. Each
+      serves a particular purpose and is generally optimized for that purpose. Each of the implementations is derived
+      from the <interfacename>ObjectStore</interfacename> interface, which defines the minimum operations which must be
+      provided for an object store implementation to be used by the Transaction Service. You can override the default
+      object store implementation at runtime by setting the
+      <varname>com.arjuna.ats.arjuna.objectstore.objectStoreType</varname> property variable to one of the types
+      described below.
+    </para>
+    <example>
+      <title>Class <classname>StateStatus</classname></title>
+      <programlisting language="Java" role="JAVA"><xi:include href="extras/appendix_StateStatus.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+    </example>
+    <para>
+      JBoss Transaction Service programmers do not usually need to interact with any of the object store implementations
+      directly, apart from possibly creating them in the first place. Even this is not necessary if the default store
+      type is used, since JBoss Transaction Service creates stores as necessary. All stores manipulate instances of the
+      class <classname>ObjectState</classname>. These instances are named using a <systemitem>type</systemitem> (via the
+      object's <methodname>type()</methodname> operation) and a <systemitem>Uid</systemitem>.
+    </para>
+    <para>
+      For atomic actions purposes, object states in the store can be principally in two distinct states:
+      <literal>OS_COMMITTED</literal> or <literal>OS_UNCOMMITTED</literal>. An object state starts in the
+      <literal>OS_COMMITTED</literal> state, but when it is modified under the control of an atomic action, a new second
+      object state may be written that is in the <literal>OS_UNCOMMITTED</literal> state. If the action commits, this
+      second object state replaces the original and becomes <literal>OS_COMMITTED</literal>. If the action aborts, this
+      second object state is discarded. All of the implementations provided with this release handle these state
+      transitions by making use of shadow copies of object states. However, any other implementation that maintains this
+      abstraction is permissible.
+    </para>
+    <para>
+      Object states may become hidden, and thus inaccessible, under the control of the crash recovery system.
+    </para>
+    <para>
+      You can browse the contents of a store through the <methodname>allTypes</methodname> and <methodname>allObjUids</methodname> operations. <methodname>allTypes</methodname> returns
+      an <classname>InputObjectState</classname> containing all of the type names of all objects in a store, terminated by a null
+      name. <methodname>allObjUids</methodname> returns an <classname>InputObjectState</classname> containing all of the Uids of all objects of a given type,
+      terminated by the special <methodname>Uid.nullUid()</methodname>.
+    </para>
+    
+    <section>
+      <title>Persistent object stores</title>
+      <para>
+        This section briefly describes the characteristics and optimizations of each of the supplied implementations of
+        the persistent object store. Persistent object states are mapped onto the structure of the file system supported
+        by the host operating system.
+      </para>
+
+      <section>
+        <title>Common functionality</title>
+        <para>
+          In addition to the features mentioned earlier, all of the supplied persistent object stores obey the following
+          rules:
+        </para>
+        <itemizedlist>
+          <listitem>
+            <para>
+              Each object state is stored in its own file, which is named using the Uid of the object.
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              The type of an object, as given by the <methodname>type()</methodname> operation, determines the directory
+              into which the object is placed.
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              All of the stores have a common root directory that is determined when JBoss Transaction Service is
+              configured. This directory name is automatically prepended to any store-specific root information.
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              All stores also have the notion of a localized root directory that is automatically prepended to the type
+              of the object to determine the ultimate directory name. The localized root name is specified when the
+              store is created. The default name is <literal>defaultStore</literal>.
+            </para>
+          </listitem>
+        </itemizedlist>
+        <screen><xi:include href="extras/default_layout.txt" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></screen>      
+      </section>
+      
+      <section>
+        <title>The shadowing store</title>
+        <para>
+          The shadowing store s the original version of the object store, which was provided in prior releases. It is
+          implemented by the class <classname>ShadowingStore</classname>. It is simple but slow. It uses pairs of files
+          to represent objects. One file is the shadow version and the other is the committed version. Files are opened,
+          locked, operated upon, unlocked, and closed on every interaction with the object store. This causes a lot of
+          I/O overhead.
+        </para>
+        <para>
+          If you are overriding the object store implementation, the type of this object store is
+          <literal>ShadowingStore</literal>.
+        </para>
+      </section>
+
+      
+      <section>
+        <title>No file-level locking</title>
+        <para>
+          Since transactional objects are concurrency-controlled through <classname>LockManager</classname>, you do not
+          need to impose additional locking at the file level. The basic ShadowingStore implementation handles
+          file-level locking. Therefore, the default object store implementation for JBoss Transaction Service,
+          <systemitem>ShadowNoFileLockStore</systemitem>, relies upon user-level locking. This enables it to provide
+          better performance than the <systemitem>ShadowingStore</systemitem> implementation.
+        </para>
+        <para>
+          If you are overriding the object store implementation, the type of this object store is
+          <literal>ShadowNoFileLockStore</literal>.
+        </para>
+      </section>
+      
+      <section>
+        <title>The hashed store</title>
+        <para>
+          The HashedStore has the same structure for object states as the ShadowingStore, but has an alternate directory
+          structure that is better suited to storing large numbers of objects of the same type. Using this store,
+          objects are scattered among a set of directories by applying a hashing function to the object's Uid. By
+          default, 255 sub-directories are used. However, you can override this by setting the
+          <varname>ObjectStoreEnvironmentBean.hashedDirectories</varname> environment variable accordingly.
+        </para>
+        <para>
+          If you are overriding the object store implementation, the type of this object store is <literal>HashedStore</literal>.
+        </para>
+      </section>
+
+      
+      <section>
+        <title>The JDBC store</title>
+        <para>
+          The JDBCStore uses a JDBC database to save persistent object states. When used in conjunction with the
+          Transactional Objects for Java API, nested transaction support is available. In the current implementation,
+          all object states are stored as <firstterm>Binary Large Objects (BLOBs)</firstterm> within the same table. The
+          limitation on object state size imposed by using BLOBs is <literal>64k</literal>. If you try to store an
+          object state which exceeds this limit, an error is generated and the state is not stored. The transaction is
+          subsequently forced to roll back.
+        </para>
+        <para>
+          When using the JDBC object store, the application must provide an implementation of the
+          <interfacename>JDBCAccess</interfacename> interface, located in the com.arjuna.ats.arjuna.objectstore package:
+        </para>
+        <example>
+          <title>Interface <interfacename>JDBCAccess</interfacename></title>
+          <programlisting language="Java" role="JAVA"> <xi:include href="extras/jdbcaccess.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+        </example>
+        <para>
+          The implementation of this class is responsible for providing the <classname>Connection</classname> which the
+          JDBC ObjectStore uses to save and restore object states:
+        </para>
+        <variablelist>
+          <varlistentry>
+            <term><methodname>getConnection</methodname></term>
+            <listitem>
+              <para>
+                Returns the Connection to use. This method is called whenever a connection is required, and the
+                implementation should use whatever policy is necessary for determining what connection to return. This
+                method need not return the same <classname>Connection</classname> instance more than once.
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>putConnection</term>
+            <listitem>
+              <para>
+                Returns one of the <classname>Connections</classname> acquired from
+                <methodname>getConnection</methodname>. Connections are returned if any errors occur when using them.
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>initialise</term>
+            <listitem>
+              <para>
+                Used to pass additional arbitrary information to the implementation.
+              </para>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+        <para>
+          The JDBC object store initially requests the number of <classname>Connections</classname> defined in the
+          <varname>ObjectStoreEnvironmentBean.jdbcPoolSizeInitial</varname> property and will use no more than defined
+          in the <varname>ObjectStoreEnvironmentBean.jdbcPoolSizeMaximum property</varname>.
+        </para>
+        <para>
+          The implementation of the <interfacename>JDBCAccess</interfacename> interface to use should be set in the
+          <varname>ObjectStoreEnvironmentBean.jdbcUserDbAccess</varname> property variable.
+        </para>
+        <para>
+          If overriding the object store implementation, the type of this object store is <type>JDBCStore</type>.
+        </para>
+        <para>
+          A JDBC object store can be used for managing the transaction log. In this case, the transaction log
+          implementation should be set to <literal>JDBCActionStore</literal> and the <classname>JDBCAccess</classname>
+          implementation must be provided via the <varname>ObjectStoreEnvironmentBean.jdbcTxDbAccess property</varname>
+          variable. In this case, the default table name is <systemitem>JBossTSTxTable</systemitem>.
+        </para>
+        <para>
+          You can use the same <classname>JDBCAccess</classname> implementation for both the user object store and the
+          transaction log.
+        </para>
+      </section>
+      
+      <section>
+        <title>The cached store</title>
+        <para>
+          This object store uses the hashed object store, but does not read or write states to the persistent backing
+          store immediately. It maintains the states in a volatile memory cache and either flushes the cache
+          periodically or when it is full. The failure semantics associated with this object store are different from
+          the normal persistent object stores, because a failure could result in states in the cache being lost.
+        </para>
+        <para>
+          If overriding the object store implementation, the type of this object store is <type>CacheStore</type>.
+        </para>
+        <variablelist>
+          <title>Configuration Properties</title>
+          <varlistentry>
+            <term>ObjectStoreEnvironmentBean.cacheStoreHash</term>
+            <listitem>
+              <para>
+                sets the number of internal stores to hash the states over. The default value is 128.              
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>ObjectStoreEnvironmentBean.cacheStoreSize</term>
+            <listitem>
+              <para>
+                the maximum size the cache can reach before a flush is triggered. The default is 10240 bytes.               
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>ObjectStoreEnvironmentBean.cacheStoreRemovedItems</term>
+            <listitem>
+              <para>
+                the maximum number of removed items that the cache can contain before a flush is triggered. By default,
+                calls to remove a state that is in the cache will simply remove the state from the cache, but leave a
+                blank entry (rather than remove the entry immediately, which would affect the performance of the
+                cache). When triggered, these entries are removed from the cache. The default value is twice the size of
+                the hash.
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>ObjectStoreEnvironmentBean.cacheStoreWorkItems</term>
+            <listitem>
+              <para>
+                the maximum number of items that are allowed to build up in the cache before it is flushed. The default
+                value is 100.  <varname>ObjectStoreEnvironmentBean.cacheStoreScanPeriod</varname> sets the time in
+                milliseconds for periodically flushing the cache. The default is 120 seconds.
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>ObjectStoreEnvironmentBean.cacheStoreSync</term>
+            <listitem>
+              <para>
+                determines whether flushes of the cache are sync-ed to disk. The default is <literal>OFF</literal>. To
+                enable, set to <literal>ON</literal>.
+              </para>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+      </section>
+
+      
+      <section>
+        <title>LogStore</title>
+        <para>
+          This implementation is based on a traditional transaction log. All transaction states within the same process
+          (VM instance) are written to the same log (file), which is an append-only entity. When transaction data would
+          normally be deleted, at the end of the transaction, a <systemitem>delete</systemitem> record is added to the
+          log instead. Therefore, the log just keeps growing. Periodically a thread runs to prune the log of entries
+          that have been deleted.
+        </para>
+        <para>
+          A log is initially given a maximum capacity beyond which it cannot grow. After it reaches this size, the
+          system creates a new log for transactions that could not be accommodated in the original log. The new log and
+          the old log are pruned as usual. During the normal execution of the transaction system, there may be an
+          arbitrary number of log instances. These should be garbage collected by the system,(or the recovery
+          sub-system, eventually.
+        </para>
+        <para>
+          Check the Configuration Options table for how to configure the LogStore.
+        </para>
+      </section>
+    </section>
+  </section>
+</appendix>
\ No newline at end of file

Deleted: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Configuration_Options.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Configuration_Options.xml	2010-10-02 15:00:03 UTC (rev 35391)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Configuration_Options.xml	2010-10-04 06:52:52 UTC (rev 35398)
@@ -1,28 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "ArjunaCore_Development_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<chapter>
-  <title>Configuration options</title>
-  <para>
-
-  </para>
-  <section>
-    <title>Loading a configuration</title>
-    <para>
-
-    </para>
-  </section>
-
-  
-  <section>
-    <title>Options</title>
-    <para>
-      
-    </para>
-    
-  </section>
-
-</chapter>
-

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Configuration_Options.xml (from rev 35396, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Configuration_Options.xml)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Configuration_Options.xml	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Configuration_Options.xml	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,226 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "ArjunaCore_Development_Guide.ent">
+%BOOK_ENTITIES;
+]>
+<chapter id="chap-configuration-options">
+  <title>Configuration options</title>
+
+  <section>
+    <title>Loading a configuration</title>
+    <para>
+      Each module of the system contains a <classname><replaceable>module</replaceable>propertyManager</classname>
+      class., which provides static getter methods for one or more
+      <classname><replaceable>name</replaceable>EnvironmentBean</classname> classes. An example is
+      <classname>com.arjuna.ats.arjuna.commmon.arjPropertyManager</classname>.  These environment beans are standard
+      javabeans containing properties for each configuration option in the system. Typical usage is of the form:
+    </para>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/defaultTimeout.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+    <para>
+      These beans are singletons, instantiated upon first access, using the following algorithm.
+    </para>
+    <procedure>
+      <title>Algorithm for environment bean instantiation</title>
+      <step>
+        <para>
+          The properties are loaded and populated from a properties file named and located as follows:
+        </para>
+        <substeps>
+          <step>
+            <para>
+              If the properties file name property is set, its value is used as the file name.
+            </para>
+          </step>
+          <step>
+            <para>
+              If not, the default filename for the product is used.
+            </para>
+          </step>
+        </substeps>
+      </step>
+      <step>
+        <para>
+          The file thus named is searched for by, in order
+        </para>
+        <orderedlist>
+          <listitem>
+            <para>
+              absolute path
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              user.dir
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              user.home
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              java.home
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              directories contained on the classpath
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              a default file embedded in the product .jar file.
+            </para>
+          </listitem>
+        </orderedlist>
+      </step>
+      <step>
+        <para>
+          The file is treated as being of standard java.util.Properties xml format and loaded accordingly. The entry
+          names are of the form EnvironmentBeanClass.propertyName:<code>&lt;entry
+          key="CoordinatorEnvironmentBean.commitOnePhase"&gt;YES&lt;/entry&gt;</code>. Valid values for boolean
+          properties are case-insensitive, and may be one of:
+        </para>
+        <itemizedlist>
+          <listitem>
+            <para>
+              NO
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              YES
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              FALSE
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              TRUE
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              OFF
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              ON
+            </para>
+          </listitem>
+        </itemizedlist>
+        <para>
+          In the case of properties that take multiple values, they are whitespace-delimited.
+        </para>
+        <example>
+          <title>Example Environment Bean</title>
+          <programlisting language="XML" role="XML"> <xi:include href="extras/EnvironmentBeans.xml" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+        </example>
+      </step>
+      <step>
+        <para>
+          After the file is loaded, it is cached and is not re-read until the JVM is restarted. Changes to the
+          properties file require a restart in order to take effect.
+        </para>
+      </step>
+    <step>
+      <para>
+        After the properties are loaded, the EnvironmentBean is then inspected and, for each field, if the properties
+        contains a matching key in the search order as follows, the <methodname>setter</methodname> method for that field is invoked with the
+        value from the properties, or the system properties if different.
+      </para>
+      <itemizedlist>
+        <listitem>
+          <para>
+            Fully.Qualified.NameEnvironmentBean.propertyName
+          </para>
+        </listitem>
+        <listitem>
+          <para>
+            NameEnvironmentBean.propertyName (this is the preferred form used in the properties file)
+          </para>
+        </listitem>
+        <listitem>
+          <para>
+            the old com.arjuna... properties key (deprecated, for backwards compatibility only).
+          </para>
+        </listitem>
+      </itemizedlist>
+    </step>
+    <step>
+      <para>
+        The bean is then returned to the caller, which may further override values by calling setter methods.
+      </para>
+    </step>
+    </procedure>
+    <para>
+      The implementation reads most bean properties only once, as the consuming component or class is instantiated. This
+      usually happens the first time a transaction is run. As a result, calling <methodname>setter</methodname> methods
+      to change the value of bean properties while the system is running typically has no effect, unless it is done
+      prior to any use of the transaction system. Altered bean properties are not persisted back to the properties file.
+    </para>
+    <para>
+      You can configure the system using a bean wiring system such as JBoss Microcontainer or Spring. Take care when
+      instantiating beans, to obtain the singleton via the static getter (factory) method on the module property
+      manager. Using a new bean instantiated with the default constructor is ineffective, since it is not possible to
+      pass this configured bean back to the property management system.
+    </para>
+  </section>
+
+  
+  <section>
+    <title>Options</title>
+    <para>
+      The canonical reference for configuration options is the Javadoc of the various
+      <classname>EnvironmentBean</classname> classes, For ArjunaCore these are:
+    </para>
+    <itemizedlist>
+      <listitem>
+        <para>
+          <classname>com.arjuna.common.internal.util.logging.LoggingEnvironmentBean.java </classname>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <classname>com.arjuna.common.internal.util.logging.basic.BasicLogEnvironmentBean.java </classname>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <classname>com.arjuna.ats.txoj.common.TxojEnvironmentBean.java </classname>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <classname>com.arjuna.ats.arjuna.common.CoordinatorEnvironmentBean.java </classname>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <classname>com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean.java </classname>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <classname>com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean.java </classname>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <classname>com.arjuna.ats.arjuna.common.CoreEnvironmentBean.java </classname>
+        </para>
+      </listitem>
+    </itemizedlist>
+    <para>
+      Additional modules built on ArjunaCore may include further beans containing module-specific configuration
+      options. Refer to the documentation for the specific modules for more information.
+    </para>
+  </section>
+
+</chapter>
+

Deleted: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Constructing_A_Transactional_Objects_For_Java_Application.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Constructing_A_Transactional_Objects_For_Java_Application.xml	2010-10-02 15:00:03 UTC (rev 35391)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Constructing_A_Transactional_Objects_For_Java_Application.xml	2010-10-04 06:52:52 UTC (rev 35398)
@@ -1,13 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "ArjunaCore_Development_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<chapter>
-  <title>Constructing a Transactional Objects for Java application</title>
-  <para>
-
-  </para>
-  
-</chapter>
-

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Constructing_A_Transactional_Objects_For_Java_Application.xml (from rev 35396, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Constructing_A_Transactional_Objects_For_Java_Application.xml)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Constructing_A_Transactional_Objects_For_Java_Application.xml	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Constructing_A_Transactional_Objects_For_Java_Application.xml	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,184 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "ArjunaCore_Development_Guide.ent">
+%BOOK_ENTITIES;
+]>
+<chapter>
+  <title>Constructing a Transactional Objects for Java application</title>
+  <orderedlist>
+    <title>Development Phases of a TxCore Application</title>
+    <listitem>
+      <para>
+        First, develop new classes with characteristics like persistence, recoverability, and concurrency control.
+      </para>
+    </listitem>
+    <listitem>
+      <para>
+        Then develop the applications that make use of the new classes of objects.
+      </para>
+    </listitem>
+  </orderedlist>
+  <para>
+    Although these two phases may be performed in parallel and by a single person, this guide refers to the first step
+    as the job of the class developer, and the second as the job of the applications developer.<!--Rewrite this --> The
+    class developer defines appropriate <methodname>save_state</methodname> and <methodname>restore_state</methodname>
+    operations for the class, sets appropriate locks in operations, and invokes the appropriate TxCore class
+    constructors. The applications developer defines the general structure of the application, particularly with regard
+    to the use of atomic actions.
+  </para>
+  <para>
+    This chapter outlines a simple application, a simple FIFO Queue class for integer values. The Queue is implemented
+    with a doubly linked list structure, and is implemented as a single object. This example is used throughout the rest
+    of this manual to illustrate the various mechanisms provided by TxCore. Although this is an unrealistic example
+    application, it illustrates all of the TxCore modifications without requiring in depth knowledge of the application
+    code.
+  </para>
+  <note>
+    <para>
+      The application is assumed not to be distributed. To allow for distribution, context information must be
+      propagated either implicitly or explicitly.
+    </para>
+  </note>
+
+  
+  <section>
+    <title>Queue description</title>
+    <para>
+      The queue is a traditional FIFO queue, where elements are added to the front and removed from the back. The
+      operations provided by the queue class allow the values to be placed on to the queue (<methodname>enqueue</methodname>) and to be removed
+      from it (<methodname>dequeue</methodname>), and values of elements in the queue can also be changed or inspected. In this
+      example implementation, an array represents the queue. A limit of <varname>QUEUE_SIZE</varname> elements has been imposed
+      for this example.
+    </para>
+    <example>
+      <title>Java interface definition of class <classname>queue</classname></title>
+      <programlisting language="Java" role="JAVA"><xi:include href="extras/example_queue_class.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+    </example>
+
+  </section>
+  
+  <section>
+    <title>Constructors and destructors</title>
+    <para>
+      Using an existing persistent object requires the use of a special constructor
+      that takes the Uid of the persistent object, as shown in <xref linkend="example-TransactionalQueue" />.
+    </para>
+    <example id="example-TransactionalQueue">
+      <title>Class <classname>TransactionalQueue</classname></title>
+      <programlisting language="Java" role="JAVA"> <xi:include href="extras/example-TransactionalQueue.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+    </example>
+    <para>
+      The use of an atomic action within the constructor for a new object follows the guidelines outlined earlier and
+      ensures that the object’s state will be written to the object store when the appropriate top level atomic action
+      commits (which will either be the action A or some enclosing action active when the TransactionalQueue was
+      constructed). The use of atomic actions in a constructor is simple: an action must first be declared and its begin
+      operation invoked; the operation must then set an appropriate lock on the object (in this case a WRITE lock must
+      be acquired), then the main body of the constructor is executed. If this is successful the atomic action can be
+      committed, otherwise it is aborted.
+    </para>
+    <para>
+      The destructor of the <classname>queue</classname> class is only required to call the
+      <methodname>terminate</methodname> operation of <classname>LockManager</classname>.
+    </para>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/example_queue_destructor.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+    
+  </section>
+  
+  <section>
+    <title>Required methods</title>
+    <section>
+      <title><methodname>save_state</methodname>, <methodname>restore_state</methodname>, and <methodname>type</methodname></title>
+      <example>
+        <title>Method <methodname>save_state</methodname></title>
+        <programlisting language="Java" role="JAVA"><xi:include href="extras/example-queue_save_state.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+      </example>
+
+      <example>
+        <title>Method <methodname>restore_state</methodname></title>
+        <programlisting language="Java" role="JAVA"><xi:include href="extras/example-queue_restore_state.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+      </example>
+      <example>
+        <title>Method <methodname>type</methodname></title>
+        <para>
+          Because the Queue class is derived from the LockManager class, the operation type should be:
+        </para>
+        <programlisting language="Java" role="JAVA"><xi:include href="extras/example-queue_type.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+      </example>
+    </section>
+    
+    <section>
+      <title><methodname>enque</methodname> and <methodname>dequeue</methodname> methods</title>
+      <para>
+        If the operations of the <classname>queue</classname> class are to be coded as atomic actions, then the enqueue
+        operation might have the structure given below. The <methodname>dequeue</methodname> operation is similarly
+        structured, but is not implemented here.
+      </para>
+      <example>
+        <title>Method <methodname>enqueue</methodname></title>
+        <programlisting language="Java" role="JAVA"><xi:include href="extras/example-queue_enqueue.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+      </example>
+    </section>
+
+    
+    <section>
+      <title><methodname>queueSize</methodname> method</title>
+      <example>
+        <title>Method <methodname>queueSize</methodname></title>
+        <programlisting language="Java" role="JAVA"><xi:include href="extras/example-queue_queueSize.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+      </example>
+    </section>
+
+    
+    <section>
+      <title><methodname>inspectValue</methodname> and <methodname>setValue</methodname> methods</title>
+      <note>
+        <para>
+          The <methodname>setValue</methodname> method is not implemented here, but is similar in structure to <xref
+          linkend="example_queue-inspectValue" />.
+        </para>
+      </note>
+      <example id="example_queue-inspectValue">
+        <title>Method <methodname>inspectValue</methodname></title>
+        <programlisting language="Java" role="JAVA"><xi:include href="extras/example-queue_inspectValue.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+      </example>
+    </section>
+  </section>
+
+  
+  <section>
+    <title>The client</title>
+    <para>
+      Rather than show all of the code for the client, this example concentrates on a representative portion. Before
+      invoking operations on the object, the client must first bind to the object. In the local case this simply
+      requires the client to create an instance of the object.
+    </para>
+    <example>
+      <title>Binding to the Object</title>
+      <programlisting language="Java" role="JAVA"> <xi:include href="extras/example-queue_main.java"
+      xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+    </example>
+    
+  </section>
+
+  
+  <section>
+    <title>Comments</title>
+    <para>
+      Since the <systemitem>queue</systemitem> object is persistent, the state of the object survives any failures of
+      the node on which it is located. The state of the object that survives is the state produced by the last top-level
+      committed atomic action performed on the object. If an application intends to perform two
+      <methodname>enqueue</methodname> operations atomically, for example, you can nest the
+      <methodname>enqueue</methodname> operations in another enclosing atomic action. In addition, concurrent operations
+      on such a persistent object are serialized, preventing inconsistencies in the state of the object.
+    </para>
+    <para>
+      However, since the elements of the <systemitem>queue</systemitem> objects are not individually concurrency
+      controlled, certain combinations of concurrent operation invocations are executed serially, even though logically
+      they could be executed concurrently. An example of this is modifying the states of two different elements in the
+      queue.  <xref linkend="chap-configuration-options" /> addresses some of these issues.
+    </para>
+    
+  </section>
+
+</chapter>
+

Deleted: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Development_Guide.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Development_Guide.xml	2010-10-02 15:00:03 UTC (rev 35391)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Development_Guide.xml	2010-10-04 06:52:52 UTC (rev 35398)
@@ -1,22 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "ArjunaCore_Development_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<book>
-  <xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-  <xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-  <!--   <xi:include href="Chapter.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />-->
-
-  <xi:include href="Overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-  <xi:include href="Using_TxCore.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-  <xi:include href="General_Transaction_Issues.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-  <xi:include href="Hints_and_Tips.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-  <xi:include href="Tools.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-  <xi:include href="Constructing_A_Transactional_Objects_For_Java_Application.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-  <xi:include href="Appendix_Object_Store_Implementations.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-  <xi:include href="Appendix_Class_Definitions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-  <xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-  <index />
-</book>
-

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Development_Guide.xml (from rev 35396, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Development_Guide.xml)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Development_Guide.xml	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/Development_Guide.xml	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,23 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "ArjunaCore_Development_Guide.ent">
+%BOOK_ENTITIES;
+]>
+<book>
+  <xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <!--   <xi:include href="Chapter.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />-->
+
+  <xi:include href="Overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <xi:include href="Using_TxCore.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <xi:include href="General_Transaction_Issues.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <xi:include href="Hints_and_Tips.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <xi:include href="Tools.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <xi:include href="Constructing_A_Transactional_Objects_For_Java_Application.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <xi:include href="Configuration_Options.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <xi:include href="Appendix_Object_Store_Implementations.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <xi:include href="Appendix_Class_Definitions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <index />
+</book>
+

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/AtomicAction_class.java (from rev 35397, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/AtomicAction_class.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/AtomicAction_class.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/AtomicAction_class.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,21 @@
+public class AtomicAction
+{
+    public AtomicAction ();
+
+    public void begin () throws SystemException, SubtransactionsUnavailable,
+                                NoTransaction;
+    public void commit (boolean report_heuristics) throws SystemException, 
+                                                          NoTransaction, HeuristicMixed,
+                                                          HeuristicHazard,TransactionRolledBack;
+    public void rollback () throws SystemException, NoTransaction;
+    public Control control () throws SystemException, NoTransaction;
+    public Status get_status () throws SystemException;
+    /* Allow action commit to be supressed */    
+    public void rollbackOnly () throws SystemException, NoTransaction;
+
+    public void registerResource (Resource r) throws SystemException, Inactive;
+    public void registerSubtransactionAwareResource (SubtransactionAwareResource sr)
+        throws SystemException, NotSubtransaction;
+    public void registerSynchronization (Synchronization s) throws SystemException,
+                                                                   Inactive;
+};
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/EnvironmentBeans.xml (from rev 35396, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/EnvironmentBeans.xml)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/EnvironmentBeans.xml	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/EnvironmentBeans.xml	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,4 @@
+<entry key="RecoveryEnvironmentBean.recoveryExtensions">
+  com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule
+  com.arjuna.ats.internal.txoj.recovery.TORecoveryModule
+</entry>
\ No newline at end of file

Deleted: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/LockManager_class.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/LockManager_class.java	2010-10-02 15:00:03 UTC (rev 35391)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/LockManager_class.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -1,4 +0,0 @@
-public abstract class LockManager extends StateManager
-{
-    public LockResult setlock (Lock toSet, int retry, int timeout);
-};
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/LockManager_class.java (from rev 35397, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/LockManager_class.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/LockManager_class.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/LockManager_class.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,38 @@
+public class LockResult
+{
+    public static final int GRANTED;
+    public static final int REFUSED;
+    public static final int RELEASED;
+};
+
+public class ConflictType
+{
+    public static final int CONFLICT;
+    public static final int COMPATIBLE;
+    public static final int PRESENT;
+};
+
+public abstract class LockManager extends StateManager
+{
+    public static final int defaultRetry;
+    public static final int defaultTimeout;
+    public static final int waitTotalTimeout;
+
+    public final synchronized boolean releaselock (Uid lockUid);
+    public final synchronized int setlock (Lock toSet);
+    public final synchronized int setlock (Lock toSet, int retry);
+    public final synchronized int setlock (Lock toSet, int retry, int sleepTime);
+    public void print (PrintStream strm);
+    public String type ();
+    public boolean save_state (OutputObjectState os, int ObjectType);
+    public boolean restore_state (InputObjectState os, int ObjectType);
+
+    protected LockManager ();
+    protected LockManager (int ot);
+    protected LockManager (int ot, int objectModel);
+    protected LockManager (Uid storeUid);
+    protected LockManager (Uid storeUid, int ot);
+    protected LockManager (Uid storeUid, int ot, int objectModel);
+
+    protected void terminate ();
+};
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/OutputBuffer_class.java (from rev 35397, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/OutputBuffer_class.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/OutputBuffer_class.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/OutputBuffer_class.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,42 @@
+public class OutputBuffer
+{
+    public  OutputBuffer ();
+
+    public final synchronized boolean valid ();
+    public synchronized byte[] buffer();
+    public synchronized int length ();
+
+    /* pack operations for standard Java types */
+
+    public synchronized void packByte (byte b) throws IOException;
+    public synchronized void packBytes (byte[] b) throws IOException;
+    public synchronized void packBoolean (boolean b) throws IOException;
+    public synchronized void packChar (char c) throws IOException;
+    public synchronized void packShort (short s) throws IOException;
+    public synchronized void packInt (int i) throws IOException;
+    public synchronized void packLong (long l) throws IOException;
+    public synchronized void packFloat (float f) throws IOException;
+    public synchronized void packDouble (double d) throws IOException;
+    public synchronized void packString (String s) throws IOException;
+};
+public class InputBuffer
+{
+    public  InputBuffer ();
+
+    public final synchronized boolean valid ();
+    public synchronized byte[] buffer();
+    public synchronized int length ();
+
+    /* unpack operations for standard Java types */
+
+    public synchronized byte unpackByte () throws IOException;
+    public synchronized byte[] unpackBytes () throws IOException;
+    public synchronized boolean unpackBoolean () throws IOException;
+    public synchronized char unpackChar () throws IOException;
+    public synchronized short unpackShort () throws IOException;
+    public synchronized int unpackInt () throws IOException;
+    public synchronized long unpackLong () throws IOException;
+    public synchronized float unpackFloat () throws IOException;
+    public synchronized double unpackDouble () throws IOException;
+    public synchronized String unpackString () throws IOException;
+};
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/OutputObjectState_class.java (from rev 35397, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/OutputObjectState_class.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/OutputObjectState_class.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/OutputObjectState_class.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,18 @@
+class OutputObjectState extends OutputBuffer
+{
+    public OutputObjectState (Uid newUid, String typeName);
+
+    public boolean notempty ();
+    public int size ();
+    public Uid stateUid ();
+    public String type ();
+};
+class InputObjectState extends ObjectState
+{
+    public OutputObjectState (Uid newUid, String typeName, byte[] b);
+
+    public boolean notempty ();
+    public int size ();
+    public Uid stateUid ();
+    public String type ();
+};
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/StateManager_class.java (from rev 35397, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/StateManager_class.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/StateManager_class.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/StateManager_class.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,42 @@
+public class ObjectStatus
+{
+    public static final int PASSIVE;
+    public static final int PASSIVE_NEW;
+    public static final int ACTIVE;
+    public static final int ACTIVE_NEW;
+};
+
+public class ObjectType
+{
+    public static final int RECOVERABLE;
+    public static final int ANDPERSISTENT;
+    public static final int NEITHER;
+};
+ 
+public abstract class StateManager
+{
+    public boolean restore_state (InputObjectState os, int ot);
+    public boolean save_state (OutputObjectState os, int ot);
+    public String type ();
+
+    public synchronized boolean activate ();
+    public synchronized boolean activate (String rootName);
+    public synchronized boolean deactivate ();
+    public synchronized boolean deactivate (String rootName);
+    public synchronized boolean deactivate (String rootName, boolean commit);
+
+    public synchronized int status ();
+    public final Uid get_uid ();
+    public void destroy ();
+    public void print (PrintStream strm);
+
+    protected void terminate ();
+
+    protected StateManager ();
+    protected StateManager (int ot);
+    protected StateManager (int ot, int objectModel);
+    protected StateManager (Uid objUid);
+    protected StateManager (Uid objUid, int ot);
+    protected StateManager (Uid objUid, int ot, int objectModel);
+    protected synchronized final void modified ();
+};
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/Uid_class.java (from rev 35397, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/Uid_class.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/Uid_class.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/Uid_class.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,21 @@
+public class Uid implements Cloneable
+{
+    public Uid ();
+    public Uid (Uid copyFrom);
+    public Uid (String uidString);
+    public Uid (String uidString, boolean errorsOk);
+    public synchronized void pack (OutputBuffer packInto) throws IOException;
+    public synchronized void unpack (InputBuffer unpackFrom) throws IOException;
+
+    public void print (PrintStream strm);
+    public String toString ();
+    public Object clone () throws CloneNotSupportedException;
+    public synchronized void copy (Uid toCopy) throws UidException;
+    public boolean equals (Uid u);
+    public boolean notEquals (Uid u);
+    public boolean lessThan (Uid u);
+    public boolean greaterThan (Uid u);
+
+    public synchronized final boolean valid ();
+    public static synchronized Uid nullUid ();
+};
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/appendix_StateStatus.java (from rev 35397, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/appendix_StateStatus.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/appendix_StateStatus.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/appendix_StateStatus.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,63 @@
+
+/*
+ * This is the base class from which all object store types are derived.
+ * Note that because object store instances are stateless, to improve
+ * efficiency we try to only create one instance of each type per process.
+ * Therefore, the create and destroy methods are used instead of new
+ * and delete. If an object store is accessed via create it *must* be
+ * deleted using destroy. Of course it is still possible to make use of
+ * new and delete directly and to create instances on the stack.
+ */
+
+public class StateStatus
+{
+    public static final int OS_ORIGINAL;
+    public static final int OS_SHADOW;
+    public static final int OS_UNCOMMITTED;
+    public static final int OS_UNCOMMITTED_HIDDEN;
+    public static final int OS_UNKNOWN;
+}
+
+public class StateType
+{
+    public static final int OS_COMMITTED;
+    public static final int OS_COMMITTED_HIDDEN;
+    public static final int OS_HIDDEN;
+    public static final int OS_INVISIBLE;
+}
+
+public abstract class ObjectStore implements BaseStore, ParticipantStore,
+                                             RecoveryStore, TxLog
+{
+    public ObjectStore (String osRoot);
+    public synchronized boolean allObjUids (String s, InputObjectState buff)
+        throws ObjectStoreException;
+    public synchronized boolean allObjUids (String s, InputObjectState buff,
+                                            int m) throws ObjectStoreException;
+
+    public synchronized boolean allTypes (InputObjectState buff)
+        throws ObjectStoreException;
+    public synchronized int currentState(Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized boolean commit_state (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized boolean hide_state (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized boolean reveal_state (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized InputObjectState read_committed (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized InputObjectState read_uncommitted (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized boolean remove_committed (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized boolean remove_uncommitted (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized boolean write_committed (Uid u, String tn,
+                                                 OutputObjectState buff)
+        throws ObjectStoreException;
+    public synchronized boolean write_uncommitted (Uid u, String tn,
+                                                   OutputObjectState buff)
+        throws ObjectStoreException;
+    public static void printState (PrintStream strm, int res);
+};
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/defaultTimeout.java (from rev 35396, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/defaultTimeout.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/defaultTimeout.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/defaultTimeout.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,2 @@
+int defaultTimeout = 
+    arjPropertyManager.getCoordinatorEnvironmentBean().getDefaultTimeout();

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/default_layout.txt (from rev 35396, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/default_layout.txt)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/default_layout.txt	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/default_layout.txt	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,11 @@
+<ObjectStore root Directory from configure>     <filename>/JBossTS/ObjectStore/</filename>
+   <ObjectStore Type1>                          <filename>FragmentedStore/</filename>
+      <Default root>                            <filename>defaultStore/</filename>
+         <StateManager>                         <filename>StateManager</filename>
+            <LockManager>                       <filename>LockManager/</filename>
+               <User Types>      
+      <Localised root 2>                        <filename>myStore/</filename>
+         <StateManager>                         <filename>StateManager/</filename>
+
+   <ObjectStore Type2>                          <filename>ActionStore/</filename>
+         <Default root>                         <filename>defaultStore/</filename>

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-TransactionalQueue.java (from rev 35392, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/example-TransactionalQueue.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-TransactionalQueue.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-TransactionalQueue.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,34 @@
+public TransactionalQueue (Uid u)
+{
+    super(u);
+
+    numberOfElements = 0;
+}
+The constructor that creates a new persistent object is similar:
+    public TransactionalQueue ()
+{
+    super(ObjectType.ANDPERSISTENT);
+
+    numberOfElements = 0;
+
+    try
+        {
+            AtomicAction A = new AtomicAction();
+
+            A.begin(0); // Try to start atomic action
+
+            // Try to set lock
+
+            if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
+                {
+                    A.commit(true); // Commit
+                }
+            else           // Lock refused so abort the atomic action
+                A.rollback();
+        }
+    catch (Exception e)
+        {
+            System.err.println(“Object construction error: “+e);
+            System.exit(1);
+        }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_enqueue.java (from rev 35392, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/example-queue_enqueue.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_enqueue.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_enqueue.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,37 @@
+public void enqueue (int v) throws OverFlow, UnderFlow, QueueError
+{
+    AtomicAction A = new AtomicAction();
+    boolean res = false;
+
+    try
+        {
+            A.begin(0);
+
+            if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
+                {
+                    if (numberOfElements < QUEUE_SIZE)
+                        {
+                            elements[numberOfElements] = v;
+                            numberOfElements++;
+                            res = true;
+                        }
+                    else
+                        {
+                            A.rollback();
+                            throw new UnderFlow();
+                        }
+                }
+
+            if (res)
+                A.commit(true);
+            else
+                {
+                    A.rollback();
+                    throw new Conflict();
+                }
+        }
+    catch (Exception e1)
+        {
+            throw new QueueError();
+        }
+}       
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_inspectValue.java (from rev 35392, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/example-queue_inspectValue.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_inspectValue.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_inspectValue.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,50 @@
+public int inspectValue (int index) throws UnderFlow,
+                                           OverFlow, Conflict, QueueError
+{
+    AtomicAction A = new AtomicAction();
+    boolean res = false;
+    int val = -1;
+
+    try
+        {
+            A.begin();
+
+            if (setlock(new Lock(LockMode.READ), 0) == LockResult.GRANTED)
+                {
+                    if (index < 0)
+                        {
+                            A.rollback();
+                            throw new UnderFlow();
+                        }
+                    else
+                        {
+                            // array is 0 - numberOfElements -1
+
+                            if (index > numberOfElements -1)
+                                {
+                                    A.rollback();
+                                    throw new OverFlow();
+                                }
+                            else
+                                {
+                                    val = elements[index];
+                                    res = true;
+                                }
+                        }
+                }
+
+            if (res)
+                A.commit(true);
+            else
+                {
+                    A.rollback();
+                    throw new Conflict();
+                }
+        }
+    catch (Exception e1)
+        {
+            throw new QueueError();
+        }
+
+    return val;
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_main.java (from rev 35392, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/example-queue_main.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_main.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_main.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,33 @@
+public static void main (String[] args)
+{
+    TransactionalQueue myQueue = new TransactionalQueue();
+    Before invoking one of the queue’s operations, the client starts a transaction. The queueSize operation is shown below:
+    AtomicAction A = new AtomicAction();
+    int size = 0;
+ 
+    try
+        {
+            A.begin(0);
+
+            try
+                {
+                    size = queue.queueSize();
+                }
+            catch (Exception e)
+                {
+                }
+
+            if (size >= 0)
+                {
+                    A.commit(true);
+
+                    System.out.println(“Size of queue: “+size);
+                }
+            else
+                A.rollback();
+        }
+    catch (Exception e)
+        {
+            System.err.println(“Caught unexpected exception!”);
+        }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_queueSize.java (from rev 35392, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/example-queue_queueSize.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_queueSize.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_queueSize.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,28 @@
+public int queueSize () throws QueueError, Conflict
+{
+    AtomicAction A = new AtomicAction();
+    int size = -1;
+
+    try
+        {
+            A.begin(0);
+
+            if (setlock(new Lock(LockMode.READ), 0) == LockResult.GRANTED)
+                size = numberOfElements;
+    
+            if (size != -1)
+                A.commit(true);
+            else
+                {
+                    A.rollback();
+
+                    throw new Conflict();
+                }
+        }
+    catch (Exception e1)
+        {
+            throw new QueueError();
+        }
+
+    return size;
+}       
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_restore_state.java (from rev 35392, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/example-queue_restore_state.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_restore_state.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_restore_state.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,22 @@
+public boolean restore_state (InputObjectState os, int ObjectType)
+{
+    if (!super.restore_state(os, ObjectType))
+        return false;
+
+    try
+        {
+            numberOfElements = os.unpackInt();
+
+            if (numberOfElements > 0)
+                {
+                    for (int i = 0; i < numberOfElements; i++)
+                        elements[i] = os.unpackInt();
+                }
+
+            return true;
+        }
+    catch (IOException e)
+        {
+            return false;
+        }
+}

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_save_state.java (from rev 35392, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/example-queue_save_state.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_save_state.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_save_state.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,22 @@
+public boolean save_state (OutputObjectState os, int ObjectType)
+{
+    if (!super.save_state(os, ObjectType))
+        return false;
+
+    try
+        {
+            os.packInt(numberOfElements);
+
+            if (numberOfElements > 0)
+                {
+                    for (int i = 0; i < numberOfElements; i++)
+                        os.packInt(elements[i]);
+                }
+
+            return true;
+        }
+    catch (IOException e)
+        {
+            return false;
+        }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_type.java (from rev 35392, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/example-queue_type.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_type.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example-queue_type.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,4 @@
+public String type ()
+{
+    return "/StateManager/LockManager/TransactionalQueue";
+}       

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example_queue_class.java (from rev 35392, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/example_queue_class.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example_queue_class.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example_queue_class.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,26 @@
+public class TransactionalQueue extends LockManager
+{
+    public TransactionalQueue (Uid uid);
+    public TransactionalQueue ();
+    public void finalize ();
+
+    public void enqueue (int v) throws OverFlow, UnderFlow,
+                                       QueueError, Conflict;
+    public int dequeue  () throws OverFlow, UnderFlow,
+                                  QueueError, Conflict;
+
+    public int queueSize ();
+    public int inspectValue (int i) throws OverFlow,
+                                           UnderFlow, QueueError, Conflict;
+    public void setValue (int i, int v) throws OverFlow,
+                                               UnderFlow, QueueError, Conflict;
+
+    public boolean save_state (OutputObjectState os, int ObjectType);
+    public boolean restore_state (InputObjectState os, int ObjectType);
+    public String type ();
+
+    public static final int QUEUE_SIZE = 40; // maximum size of the queue
+
+    private int[QUEUE_SIZE] elements;
+    private int numberOfElements;
+};
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example_queue_destructor.java (from rev 35392, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/example_queue_destructor.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example_queue_destructor.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/example_queue_destructor.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,4 @@
+public void finalize ()
+{
+    super.terminate();
+}     
\ No newline at end of file

Copied: labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/jdbcaccess.java (from rev 35396, labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/jdbcaccess.java)
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/jdbcaccess.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/ArjunaCore_Development_Guide/en-US/extras/jdbcaccess.java	2010-10-04 06:52:52 UTC (rev 35398)
@@ -0,0 +1,6 @@
+public interface JDBCAccess
+{
+    public Connection getConnection () throws SQLException;
+    public void putConnection (Connection conn) throws SQLException;
+    public void initialise (Object[] objName);
+}
\ No newline at end of file



More information about the jboss-svn-commits mailing list