[jboss-cvs] JBossAS SVN: r103869 - branches/JBPAPP_4_2_0_GA_CP/iiop/src/main/org/jboss/tm/iiop.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Apr 12 23:24:12 EDT 2010


Author: jbertram at redhat.com
Date: 2010-04-12 23:24:11 -0400 (Mon, 12 Apr 2010)
New Revision: 103869

Modified:
   branches/JBPAPP_4_2_0_GA_CP/iiop/src/main/org/jboss/tm/iiop/TxServerClientInterceptor.java
Log:
JBPAPP-1119

Modified: branches/JBPAPP_4_2_0_GA_CP/iiop/src/main/org/jboss/tm/iiop/TxServerClientInterceptor.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/iiop/src/main/org/jboss/tm/iiop/TxServerClientInterceptor.java	2010-04-13 03:09:03 UTC (rev 103868)
+++ branches/JBPAPP_4_2_0_GA_CP/iiop/src/main/org/jboss/tm/iiop/TxServerClientInterceptor.java	2010-04-13 03:24:11 UTC (rev 103869)
@@ -61,8 +61,23 @@
    private static final int txContextId = TransactionService.value;
    private static Codec codec;
    private static TransactionManager tm;
-   private static PropagationContext emptyPC;
+   private static final PropagationContext emptyPC;
 
+   static
+   {
+      // According to the spec, this should all be ignored
+      // But we get NPEs if it doesn't contain some content
+      emptyPC = new PropagationContext();
+      emptyPC.parents = new TransIdentity[0];
+      emptyPC.current = new TransIdentity();
+      emptyPC.current.otid = new otid_t();
+      emptyPC.current.otid.formatID = 666;
+      emptyPC.current.otid.bqual_length = 1;
+      emptyPC.current.otid.tid = new byte[] { (byte) 1 };
+      emptyPC.implementation_specific_data = ORB.init().create_any();
+      emptyPC.implementation_specific_data.insert_boolean(false);
+   }
+   
    // Static methods ------------------------------------------------
 
    static void init(Codec codec)
@@ -89,20 +104,6 @@
 
    static PropagationContext getEmptyPropagationContext()
    {
-      if (emptyPC == null)
-      {
-         // According to the spec, this should all be ignored
-         // But we get NPEs if it doesn't contain some content
-         emptyPC = new PropagationContext();
-         emptyPC.parents = new TransIdentity[0];
-         emptyPC.current = new TransIdentity();
-         emptyPC.current.otid = new otid_t();
-         emptyPC.current.otid.formatID = 666;
-         emptyPC.current.otid.bqual_length = 1;
-         emptyPC.current.otid.tid = new byte[] { (byte) 1 };
-         emptyPC.implementation_specific_data = ORB.init().create_any();
-         emptyPC.implementation_specific_data.insert_boolean(false);
-      }
       return emptyPC;
    }
    




More information about the jboss-cvs-commits mailing list