[jboss-svn-commits] JBL Code SVN: r37665 - in labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples/classes/com/arjuna/jta/distributed/example: server/impl and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Oct 24 13:40:12 EDT 2011


Author: tomjenkinson
Date: 2011-10-24 13:40:12 -0400 (Mon, 24 Oct 2011)
New Revision: 37665

Modified:
   labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples/classes/com/arjuna/jta/distributed/example/ExampleDistributedJTATestCase.java
   labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples/classes/com/arjuna/jta/distributed/example/server/impl/ProxyXAResource.java
   labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples/classes/com/arjuna/jta/distributed/example/server/impl/ServerImpl.java
Log:
JBTM-895 added more documentation to clarify that the points of persistence are purely for reference and do not show best practice for reliably persisting data, for instance flushing to disk

Modified: labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples/classes/com/arjuna/jta/distributed/example/ExampleDistributedJTATestCase.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples/classes/com/arjuna/jta/distributed/example/ExampleDistributedJTATestCase.java	2011-10-24 15:18:05 UTC (rev 37664)
+++ labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples/classes/com/arjuna/jta/distributed/example/ExampleDistributedJTATestCase.java	2011-10-24 17:40:12 UTC (rev 37665)
@@ -68,6 +68,11 @@
  * programatic configurably trigger a rollback exception which is good for
  * certain situations, the example though guards "migrations" by checking their
  * state before propagation - I recommend all transports do the same.
+ * 
+ * IMPORTANT: Although this example shows points at which the transport is
+ * expected to persist data, it does not define concretely the mechanisms to do
+ * so, nor should it be considered sufficient for reliably persisting this data.
+ * For instance, we do not flush to disk.
  */
 public class ExampleDistributedJTATestCase {
 	/**
@@ -277,8 +282,9 @@
 	 * @throws NotSupportedException
 	 * @throws IOException
 	 */
-	private DataReturnedFromRemoteServer propagateTransaction(List<String> nodesToFlowTo, int remainingTimeout, Xid toMigrate, Integer nextAvailableSubordinateName) throws RollbackException,
-			IllegalStateException, XAException, SystemException, NotSupportedException, IOException {
+	private DataReturnedFromRemoteServer propagateTransaction(List<String> nodesToFlowTo, int remainingTimeout, Xid toMigrate,
+			Integer nextAvailableSubordinateName) throws RollbackException, IllegalStateException, XAException, SystemException, NotSupportedException,
+			IOException {
 		// Do some test setup to initialize this method as it if was being
 		// invoked in a remote server
 		String currentServerName = nodesToFlowTo.remove(0);
@@ -342,7 +348,8 @@
 				// indicate whether this caller is the first client to establish
 				// the
 				// subordinate transaction at the remote node
-				DataReturnedFromRemoteServer dataReturnedFromRemoteServer = propagateTransaction(nodesToFlowTo, remainingTimeout, currentXid, nextAvailableSubordinateName);
+				DataReturnedFromRemoteServer dataReturnedFromRemoteServer = propagateTransaction(nodesToFlowTo, remainingTimeout, currentXid,
+						nextAvailableSubordinateName);
 				// Resume the transaction locally, ready for any more local work
 				// and
 				// to add the proxy resource and sync if needed
@@ -431,7 +438,7 @@
 		public int getTransactionState() {
 			return transactionState;
 		}
-		
+
 		public Integer getNextAvailableSubordinateName() {
 			return nextAvailableSubordinateName;
 		}

Modified: labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples/classes/com/arjuna/jta/distributed/example/server/impl/ProxyXAResource.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples/classes/com/arjuna/jta/distributed/example/server/impl/ProxyXAResource.java	2011-10-24 15:18:05 UTC (rev 37664)
+++ labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples/classes/com/arjuna/jta/distributed/example/server/impl/ProxyXAResource.java	2011-10-24 17:40:12 UTC (rev 37665)
@@ -75,6 +75,11 @@
  * the transaction must be reloaded by the remote server before the
  * commit/rollback – if it was prepared - before we attempt to complete the
  * transaction.
+ * 
+ * IMPORTANT: Although this example shows points at which the transport is
+ * expected to persist data, it does not define concretely the mechanisms to do
+ * so, nor should it be considered sufficient for reliably persisting this data.
+ * For instance, we do not flush to disk.
  */
 public class ProxyXAResource implements XAResource {
 

Modified: labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples/classes/com/arjuna/jta/distributed/example/server/impl/ServerImpl.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples/classes/com/arjuna/jta/distributed/example/server/impl/ServerImpl.java	2011-10-24 15:18:05 UTC (rev 37664)
+++ labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/examples/classes/com/arjuna/jta/distributed/example/server/impl/ServerImpl.java	2011-10-24 17:40:12 UTC (rev 37665)
@@ -65,6 +65,12 @@
 import com.arjuna.jta.distributed.example.server.LookupProvider;
 import com.arjuna.jta.distributed.example.server.RemoteServer;
 
+/**
+ * IMPORTANT: Although this example shows points at which the transport is
+ * expected to persist data, it does not define concretely the mechanisms to do
+ * so, nor should it be considered sufficient for reliably persisting this data.
+ * For instance, we do not flush to disk.
+ */
 public class ServerImpl implements LocalServer, RemoteServer {
 
 	private RecoveryManagerService recoveryManagerService;



More information about the jboss-svn-commits mailing list