Bugs item #1006457, was opened at 2004-08-10 08:08
Message generated for change (Comment added) made by ejort
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1006457&group_id=22866
Category: JBossServer
Group: v3.0 Rabbit Hole
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: H. Hallingstad (hakonhal)
>Assigned to: Adrian Brock (ejort)
Summary: Timers are not cancelled when hot-redeploying
Initial Comment:
Windows XP, Sun's 1.4.2_01, JBoss 3.0.6.
_Description of Bug_
Instances of java.util.TimerTask scheduled for repeated
fixed-delayed execution with
java.util.Timer.schedule(TimerTask task, long delay,
long period) are not cancelled
(java.util.TimerTask.cancel() or
java.util.Timer.cancel()) when hot-redeploying.
(With "hot-redeploying" I mean what happens when the
EAR file is updated, and JBoss starts undeploying- and
later deploying- of that application.)
This was detected using a debugger. I noticed the
java.util.TimerTask.run() method was entered more times
than it should have.
I also found that when the TimerTask was run after the
hot-redeploy, the values of the "static" variables seen
by the TimerTask did not match the values seen by the
hot-redeployed application.
The "orphaned" TimerTask instances also produced a
java.lang.IllegalStateException while executing its
run() method, see stacktrace from the server console at
the bottom of this bug report.
This seems to be a tough bug since (I guess) the Java
VM schedules the TimerTask instances using the timers
of the operating system. If so, JBoss has no control
over the Timer/TimerTasks, and cannot cancel them.
If you have any questions, or want more information,
send me an email at [EMAIL PROTECTED]
Regards,
H. Hallingstad
HEAD OF SERVER OUTPUT TO THE CONSOLE:
===============================================================================
.
JBoss Bootstrap Environment
.
JBOSS_HOME: D:\Programs\jboss-3.0.6\bin\..
.
JAVA: D:\programs\j2sdkee1.4\jdk\bin\java
.
JAVA_OPTS:
-Dcom.edb.cps.configfile=D:\nettbedrift\cpsserver\src\com\edb\cps\common\config\CpsConfig.properties
-Dno.f
ellesdata.path.ini=D:\Nettbedrift\cpsnbg2\config\FdApi\Config
-Dno.fellesdata.exec.env=G -Xdebug -Xnoagent -Djava.compil
er=NONE
-Xrunjdwp:transport=dt_socket,address=9000,server=y,suspend=n
-Dprogram.name=run.bat
.
CLASSPATH:
;D:\programs\j2sdkee1.4\jdk\lib\tools.jar;D:\Programs\jboss-3.0.6\bin\run.jar
.
===============================================================================
.
08:16:10,634 INFO [Server] JBoss Release: JBoss-3.0.6
CVSTag=JBoss_3_0_6
08:16:10,650 INFO [Server] Home Dir:
D:\Programs\jboss-3.0.6
08:16:10,650 INFO [Server] Home URL:
file:/D:/Programs/jboss-3.0.6/
08:16:10,650 INFO [Server] Library URL:
file:/D:/Programs/jboss-3.0.6/lib/
08:16:10,650 INFO [Server] Patch URL: null
08:16:10,650 INFO [Server] Server Name: default
08:16:10,650 INFO [Server] Server Home Dir:
D:\Programs\jboss-3.0.6\server\default
08:16:10,650 INFO [Server] Server Home URL:
file:/D:/Programs/jboss-3.0.6/server/default/
08:16:10,650 INFO [Server] Server Data Dir:
D:\Programs\jboss-3.0.6\server\default\db
08:16:10,650 INFO [Server] Server Temp Dir:
D:\Programs\jboss-3.0.6\server\default\tmp
08:16:10,665 INFO [Server] Server Config URL:
file:/D:/Programs/jboss-3.0.6/server/default/conf/
08:16:10,665 INFO [Server] Server Library URL:
file:/D:/Programs/jboss-3.0.6/server/default/lib/
08:16:10,665 INFO [Server] Root Deployemnt Filename:
jboss-service.xml
08:16:10,665 INFO [Server] Starting General Purpose
Architecture (GPA)...
08:16:10,868 INFO [ServerInfo] Java version:
1.4.2_02,Sun Microsystems Inc.
08:16:10,868 INFO [ServerInfo] Java VM: Java
HotSpot(TM) Client VM 1.4.2_02-b03,Sun Microsystems Inc.
08:16:10,868 INFO [ServerInfo] OS-System: Windows XP
5.1,x86
EXCEPTION STACK TRACE OUTPUT TO THE SERVER CONSOLE:
08:44:41,741 ERROR [STDERR] Dynamic Log Configuration
Error:
08:44:41,741 ERROR [STDERR] org.xml.sax.SAXException:
unable to add 'poll' to <logconf> due to the following
exception:
>>>--- Begin Exception ---<<<
java.lang.IllegalStateException:
java.lang.ClassCastException
at
com.edb.cps.common.log.LogconfDescriptor$1.setValue(LogconfDescriptor.java:92)
at
org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:970)
at
org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:1038)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:605)
at
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:513)
at
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:691)
at
com.edb.cps.common.log.LogconfParser.readLogConfigFile(LogconfParser.java:73)
at
com.edb.cps.common.log.LogconfParser.access$200(LogconfParser.java:60)
at
com.edb.cps.common.log.LogconfParser$Updater.run(LogconfParser.java:191)
at java.util.TimerThread.mainLoop(Timer.java:432)
at java.util.TimerThread.run(Timer.java:382)
>>>---- End Exception ----<<<
{file: [not available]; line: 5; column: 17}
----------------------------------------------------------------------
>Comment By: Adrian Brock (ejort)
Date: 2004-08-26 16:35
Message:
Logged In: YES
user_id=9459
If you start the timer, you are responsible for cancelling
it and
waiting for any inflight requests to complete.
EJB does not allow the user of Timers until EJB2.1
(supported by JBoss4).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1006457&group_id=22866
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development