DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30499>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30499

Bug fix to run Slide on Weblogic

           Summary: Bug fix to run Slide on Weblogic
           Product: Slide
           Version: Nightly
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Transaction Manager
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Weblogic add characters like "'" or ":" in the thread name. Thoses  characters
can provide some issues for specific stores like the TxXMLFileDescriptorsStore
because this store is using the Xid name to create some folders. A small patch
is to drop those characters when a new SlideXid is instantiated.


Here is the patch for SlideTransaction : 

Index: SlideTransaction.java
===================================================================
RCS file:
/home/cvspublic/jakarta-slide/src/share/org/apache/slide/transaction/SlideTransaction.java,v
retrieving revision 1.23
diff -u -r1.23 SlideTransaction.java
--- SlideTransaction.java       28 Jul 2004 09:34:33 -0000      1.23
+++ SlideTransaction.java       5 Aug 2004 19:31:11 -0000
@@ -1,7 +1,7 @@
 /*
- * $Header:
/home/cvspublic/jakarta-slide/src/share/org/apache/slide/transaction/SlideTransaction.java,v
1.23 2004/07/28 09:34:33 ib Exp $
- * $Revision: 1.23 $
- * $Date: 2004/07/28 09:34:33 $
+ * $Header:
/home/cvspublic/jakarta-slide/src/share/org/apache/slide/transaction/SlideTransaction.java,v
1.22 2004/02/19 16:58:26 ozeigermann Exp $
+ * $Revision: 1.22 $
+ * $Date: 2004/02/19 16:58:26 $
  *
  * ====================================================================
  *
@@ -69,10 +69,7 @@
         globalCreatedTransactions++;
         currentTransactionNumber  = globalCreatedTransactions;
         currentThreadName         = Thread.currentThread().getName();
-        xid = new SlideXid
-            ((currentThreadName + "-" + System.currentTimeMillis() + "-"
-                  + currentTransactionNumber).getBytes(),
-             0, new byte[0]);
+        xid = new SlideXid(this.getName().getBytes(), 0, new byte[0]);
         this.transactionManager = transactionManager;
     }
     
@@ -708,6 +705,18 @@
             + " xid " + xid + " in thread " + currentThreadName +
             (currentThreadName.equals(Thread.currentThread().getName())?"":
                  " current= " + Thread.currentThread().getName());
+    }
+    
+    /**
+     *  Get the Xid name based on the threadName
+     */
+    public String getName()
+    {
+        // Some application servers like weblogic add characters like ' or : in
the thread name.
+        // Thoses  character can gives issues for specific stores like the
TxXMLFileDescriptorsStore
+        // This store is using the Xid name to create some folders. So, drop
thoses characters
+        String currentThreadName =
Thread.currentThread().getName().replaceAll("'", "").replaceAll(":", "");
+        return currentThreadName + "-" + System.currentTimeMillis() + "-" +
currentTransactionNumber;
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to