You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tom Howe <th...@src.uchicago.edu> on 2003/09/25 18:01:09 UTC

Quartz plugin shutdown problem

Hi,
I'm having a problem with (I think) plugins that open a new thread, such
as the Quartz plugin.  It starts up fine and appears to work alright,
but when I try to shut down, the server appears to hang on that
particular thread so that the process continues.  I tried to do this on
a completely fresh tomcat/struts install with no forms, actions, etc.
and still had no luck.  I'm using Tomcat 4.1.27, Struts 1.1 on both
windows xp and solaris 9.  Is there some kind of special configuration
that I need to do when using threads in a plugin to get it to shutdown
correctly.  Here is my struts-config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD
Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
    
    <!-- ========== Data Source Configuration
=============================== -->
    <data-sources />
    
    <!-- ========== Form Bean Definitions
================================== -->
    <form-beans />
    
    <!-- ========== Global Exception Definitions
============================== -->
    <global-exceptions />
    
    <!-- ========== Global Forward Definitions
=============================== -->
    <global-forwards />
    
    <!-- ========== Action Mapping Definitions
=============================== -->
    <action-mappings />
    
    <!-- ========== Controller Configuration
================================ -->
    <controller />
    
    <!-- ========== Message Resources Definitions
============================ -->
    <message-resources parameter="ucmap.webapp.ApplicationResources" />
    
    <!-- ========== Plug Ins Configuration
================================= -->
    <plug-in className="com.jgsullivan.struts.plugins.QuartzPlugIn">
        <set-property property="configPath"
value="/WEB-INF/quartz-config.xml" />
    </plug-in>
</struts-config>

Thanks in advance,
Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Quartz plugin shutdown problem

Posted by Joe Germuska <Jo...@Germuska.com>.
The JVM can only quit when all non-daemon threads have finished.

I don't believe the plugin itself starts any threads; it's probably a 
problem internal to Quartz -- I don't know if you can tell it that it 
should treat your scheduled tasks as daemon threads or not.

I'm not actually so familiar with the Quartz details, so I'm copying 
Patrick, my colleague who actually developed the Quartz XML builder 
and the Quartz plugin...

Joe


At 11:01 AM -0500 9/25/03, Tom Howe wrote:
>Hi,
>I'm having a problem with (I think) plugins that open a new thread, such
>as the Quartz plugin.  It starts up fine and appears to work alright,
>but when I try to shut down, the server appears to hang on that
>particular thread so that the process continues.  I tried to do this on
>a completely fresh tomcat/struts install with no forms, actions, etc.
>and still had no luck.  I'm using Tomcat 4.1.27, Struts 1.1 on both
>windows xp and solaris 9.  Is there some kind of special configuration
>that I need to do when using threads in a plugin to get it to shutdown
>correctly.  Here is my struts-config.xml:
>
><?xml version="1.0" encoding="UTF-8"?>
><!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD
>Struts Configuration 1.1//EN"
>"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
><struts-config>
>    
>     <!-- ========== Data Source Configuration
>=============================== -->
>     <data-sources />
>    
>     <!-- ========== Form Bean Definitions
>================================== -->
>     <form-beans />
>    
>     <!-- ========== Global Exception Definitions
>============================== -->
>     <global-exceptions />
>    
>     <!-- ========== Global Forward Definitions
>=============================== -->
>     <global-forwards />
>    
>     <!-- ========== Action Mapping Definitions
>=============================== -->
>     <action-mappings />
>    
>     <!-- ========== Controller Configuration
>================================ -->
>     <controller />
>    
>     <!-- ========== Message Resources Definitions
>============================ -->
>     <message-resources parameter="ucmap.webapp.ApplicationResources" />
>    
>     <!-- ========== Plug Ins Configuration
>================================= -->
>     <plug-in className="com.jgsullivan.struts.plugins.QuartzPlugIn">
>         <set-property property="configPath"
>value="/WEB-INF/quartz-config.xml" />
>     </plug-in>
></struts-config>
>
>Thanks in advance,
>Tom
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org


-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
  "We want beef in dessert if we can get it there."
   -- Betty Hogan, Director of New Product Development, National 
Cattlemen's Beef Association


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org