[jboss-cvs] JBossAS SVN: r62331 - trunk/server/src/main/org/jboss/ejb/txtimer.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Apr 13 09:53:09 EDT 2007


Author: dimitris at jboss.org
Date: 2007-04-13 09:53:09 -0400 (Fri, 13 Apr 2007)
New Revision: 62331

Modified:
   trunk/server/src/main/org/jboss/ejb/txtimer/TimerImpl.java
Log:
JBAS-4330, Give meaningful names to the EJB Timer java.util.Timer threads

Modified: trunk/server/src/main/org/jboss/ejb/txtimer/TimerImpl.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/txtimer/TimerImpl.java	2007-04-13 13:52:20 UTC (rev 62330)
+++ trunk/server/src/main/org/jboss/ejb/txtimer/TimerImpl.java	2007-04-13 13:53:09 UTC (rev 62331)
@@ -1,8 +1,8 @@
 /*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
  *
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as
@@ -360,7 +360,8 @@
 
    private void startInTx()
    {
-      utilTimer = new Timer();
+      // JBAS-4330, provide a meaningful name to the timer thread, needs jdk5+
+      utilTimer = new Timer("EJB-Timer-" + timerId + timedObjectId);
       
       if (timerService.getTransaction() != null)
       {
@@ -489,19 +490,19 @@
             case STARTED_IN_TX:
                cancelTimer();
                break;
-
+               
             case CANCELED_IN_TX:
                setTimerState(ACTIVE);
                break;
-
+               
             case IN_TIMEOUT:
                setTimerState(RETRY_TIMEOUT);
                log.debug("retry: " + this);
                timerService.retryTimeout(this);
                break;
-
+               
             case RETRY_TIMEOUT:
-               if(periode == 0)
+               if (periode == 0)
                {
                   setTimerState(EXPIRED);
                   cancelTimer();
@@ -568,7 +569,7 @@
                if (timerState == IN_TIMEOUT)
                {
                   log.debug("Timer was not registered with Tx, resetting state: " + timer);
-                  if(periode  == 0)
+                  if (periode == 0)
                   {
                      setTimerState(EXPIRED);
                      killTimer();




More information about the jboss-cvs-commits mailing list