[jboss-svn-commits] JBL Code SVN: r36247 - in labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US: extras and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Dec 7 20:24:50 EST 2010


Author: misty at redhat.com
Date: 2010-12-07 20:24:49 -0500 (Tue, 07 Dec 2010)
New Revision: 36247

Added:
   labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/extras/abstract_record_subclass.java
   labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/extras/osv-plugin-ant.xml
   labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/extras/osv_plugin.java
Modified:
   labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/ORB_Specific_Configurations.xml
Log:
Converted ORB_Specific_Configurations.xml

Modified: labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/ORB_Specific_Configurations.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/ORB_Specific_Configurations.xml	2010-12-08 01:20:01 UTC (rev 36246)
+++ labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/ORB_Specific_Configurations.xml	2010-12-08 01:24:49 UTC (rev 36247)
@@ -3,7 +3,17 @@
 <!ENTITY % BOOK_ENTITIES SYSTEM "ArjunaJTS_Development_Guide.ent">
 %BOOK_ENTITIES;
 ]>
-<chapter id="chap-ArjunaJTS_Development_Guide-Test_Chapter">
-  <title></title>
+<chapter>
+  <title>ORB-specific configuration</title>
+  
+  <section>
+    <title>JacORB</title>
+    <para>
+      Take care to use only the patched version of JacORB shipped with JBossTS. Correct functioning of the transaction
+      system, particularly with regard to crash recovery, is unlikely to work with an unpatched JacORB.  For each
+      deployment of JacORB, ensure that the <varname>jacorb.implname</varname> in the
+      <filename>jacorb.properties</filename> file is unique.
+    </para>
+  </section>
 </chapter>
 

Added: labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/extras/abstract_record_subclass.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/extras/abstract_record_subclass.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/extras/abstract_record_subclass.java	2010-12-08 01:24:49 UTC (rev 36247)
@@ -0,0 +1,53 @@
+public class SimpleRecord extends AbstractRecord
+{
+    private int _value = 0;
+
+    .....
+   
+        public void increase()
+    {
+        _value++;
+    }
+
+    public int get()
+    {
+        return _value;
+    }
+
+    public String type()
+    {
+        return “/StateManager/AbstractRecord/SimpleRecord”;
+    }
+
+    public boolean restore_state(InputObjectState os, int i)
+    {
+        boolean returnValue = true;
+   
+        try
+            {
+                _value = os.unpackInt();
+            }
+        catch (java.io.IOException e)
+            {
+                returnValue = false;
+            }
+
+        return returnValue;
+    }
+
+    public boolean save_state(OutputObjectState os, int i)
+    {
+        boolean returnValue = true;
+
+        try
+            {
+                os.packInt(_value);
+            }
+        catch (java.io.IOException e)
+            {
+                returnValue = false;
+            }
+
+        return returnValue;
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/extras/osv-plugin-ant.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/extras/osv-plugin-ant.xml	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/extras/osv-plugin-ant.xml	2010-12-08 01:24:49 UTC (rev 36247)
@@ -0,0 +1,8 @@
+<jar jarfile="osbv-simplerecord.jar">
+  <fileset dir="build" includes="*.class”/>
+  <manifest>
+    <section name="arjuna-tools-objectstorebrowser">
+      <attribute name="plugin-classname-1" value=" SimpleRecordOSVPlugin "/>
+    </section>
+  </manifest>
+</jar>
\ No newline at end of file

Added: labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/extras/osv_plugin.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/extras/osv_plugin.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaJTS/docs/ArjunaJTS_Development_Guide/en-US/extras/osv_plugin.java	2010-12-08 01:24:49 UTC (rev 36247)
@@ -0,0 +1,55 @@
+public class SimpleRecordOSVPlugin implements StateViewerInterface
+{
+    /**
+     * A uid node of the type this viewer is registered against has been expanded.
+     * @param os
+     * @param type
+     * @param manipulator
+     * @param node
+     * @throws ObjectStoreException
+     */
+    public void uidNodeExpanded(ObjectStore os,
+                                String type,
+                                ObjectStoreBrowserTreeManipulationInterface 
+                                manipulator,
+                                UidNode node,
+                                StatePanel infoPanel)
+        throws ObjectStoreException
+    {
+        // Do nothing
+    }
+
+    /**
+     * An entry has been selected of the type this viewer is registered against.
+     *
+     * @param os
+     * @param type
+     * @param uid
+     * @param entry
+     * @param statePanel
+     * @throws ObjectStoreException
+     */
+    public void entrySelected(ObjectStore os,
+                              String type,
+                              Uid uid,
+                              ObjectStoreViewEntry entry,
+                              StatePanel statePanel) 
+        throws ObjectStoreException
+    {
+        SimpleRecord rec = new SimpleRecord();
+
+        if ( rec.restore_state( os.read_committed(uid, type), ObjectType.ANDPERSISTENT ) )
+            {
+                statePanel.setData( “Value”, rec.getValue() );
+            }
+    }
+
+    /**
+     * Get the type this state viewer is intended to be registered against.
+     * @return
+     */
+    public String getType()
+    {
+        return “/StateManager/AbstractRecord/SimpleRecord”;
+    }
+}
\ No newline at end of file



More information about the jboss-svn-commits mailing list