struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mick Knutson" <mickknut...@hotmail.com>
Subject Re: Quartz plugin shutdown problem
Date Fri, 26 Sep 2003 14:18:46 GMT
MessageI am still having issues with Quartz, and would appreciate help from anyone as I am
just lost on this one.

---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---

  ----- Original Message ----- 
  From: Tom Howe 
  To: 'Mick Knutson' 
  Sent: Thursday, September 25, 2003 12:00 PM
  Subject: RE: Quartz plugin shutdown problem


  Well, that's clearly an xml problem.  Why not try dropping the XML declaration (It shouldn't
really hurt anything).
        <quartz-config>
            <!-- Create a Trigger -->
            <trigger-group>
                <!--<trigger
                name="alertSenderTrigger"
                className="org.quartz.SimpleTrigger"
                description="A Trigger to send all Alert based messages"
                volatility="false"
                misfireConstant="INSTRUCTION_RE_EXECUTE_JOB">
                <set-property property="repeatCount" value="25"/>
                <set-property property="repeatInterval" value="5000"/>
                </trigger>-->

                <trigger
                    name="alertSenderTrigger"
                    className="org.quartz.CronTrigger">
                    <set-property
                        property="cronExpression"
                        value="0 0 12 * * ?" />
                </trigger>
            </trigger-group>

            <!-- Create a Job -->
            <job-group>
                <job
                    name="alertSenderJob"
                    className="com.baselogic.yoursos.scheduler.jobs.AlertSenderJob"  />
      

            </job-group>

            <!-- Schedule the Job/Trigger -->
            <schedule job="alertSenderJob" trigger="alertSenderTrigger"/>

        </quartz-config>



        Also, is the stack trace the same or is it somewhat different?  (When I changed some
of these things, I got a different stacktrace)

        -Tom 
        ---
        Thanks
        Mick Knutson
        http://www.baselogic.com

        +001(805) 563-0666 Office
        +001 (708) 570-2772 Fax
        ---

          ----- Original Message ----- 
          From: Tom Howe 
          To: 'Mick Knutson' 
          Sent: Thursday, September 25, 2003 11:03 AM
          Subject: RE: Quartz plugin shutdown problem


          I didn't use either, actually.  This looks more like a dtd problem, than a location
problem.  Did you try the changes I made in your app?  It might be worth a try.

          -Tom
            -----Original Message-----
            From: Mick Knutson [mailto:mickknutson@hotmail.com] 
            Sent: Thursday, September 25, 2003 12:23 PM
            To: Tom Howe
            Subject: Re: Quartz plugin shutdown problem


            Do you use an EAR or WAR with yours?
            I just think it might be JAR location in my EAR, but I thought I have tried everything.

            ---
            Thanks
            Mick Knutson
            http://www.baselogic.com

            +001(805) 563-0666 Office
            +001 (708) 570-2772 Fax
            ---

              ----- Original Message ----- 
              From: Tom Howe 
              To: 'Mick Knutson' 
              Sent: Thursday, September 25, 2003 10:14 AM
              Subject: RE: Quartz plugin shutdown problem


              This seemed to work for me in Tomcat (I don't do ejb's)  Let me know if it works
out.

              <?xml version="1.0" encoding="ISO-8859-1" ?>

              <quartz-config>

              <!-- Create a Trigger -->

              <trigger-group>

              <!--<trigger

              name="alertSenderTrigger"

              className="org.quartz.SimpleTrigger"

              description="A Trigger to send all Alert based messages"

              volatility="false"

              misfireConstant="INSTRUCTION_RE_EXECUTE_JOB">

              <set-property property="repeatCount" value="25"/>

              <set-property property="repeatInterval" value="5000"/>

              </trigger>-->

              <trigger 

              name="alertSenderTrigger"

              className="org.quartz.CronTrigger">

              <set-property 

              property="cronExpression"

              value="0 0 12 * * ?"/>

              </trigger>

              </trigger-group>


              <!-- Create a Job -->

              <job-group>

              <job name="alertSenderJob"

              className="thowe.SimpleJob"

              description="alert Sender Job"

              durability="true"

              volatility="true"

              requestsRecovery="true">

              </job>

              <!--<job name="alertSenderJob"

              className="thowe.SimpleJob"/>-->


              </job-group>


              <!-- Schedule the Job/Trigger -->

              <schedule job="alertSenderJob" trigger="alertSenderTrigger"/>




              </quartz-config>



              -Tom

                -----Original Message-----
                From: Mick Knutson [mailto:mickknutson@hotmail.com] 
                Sent: Thursday, September 25, 2003 11:21 AM
                To: Tom Howe
                Cc: Mick Knutson
                Subject: Re: Quartz plugin shutdown problem


                Here are the pertinant pieces:

                I have an EAR, with a common.jar, ejb.jar and app.WAR inside
                all the quartz, and jgs jars _all_ live in my WAR.

                struts-config.xml:

                    <plug-in className="com.jgsullivan.struts.plugins.QuartzPlugIn" >
                        <set-property property="configPath"
                value="/WEB-INF/quartz-config.xml" />
                    </plug-in>


                WEB-INF/classes/quartz.properties:

                org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
                org.quartz.threadPool.threadCount = 5
                org.quartz.threadPool.threadPriority = 4
                org.quartz.jobStore.misfireThreshold = 5000
                org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore


                WEB-INF/quartz-config.xml:

                <?xml version="1.0" encoding="ISO-8859-1" ?>
                <quartz-config>
                    <!-- Create a Trigger -->
                    <trigger-group name="alertSenderTriggerGroup">
                        <trigger
                            name="alertSenderTrigger"
                            className="org.quartz.SimpleTrigger"
                            description="A Trigger to send all Alert based messages"
                            volatility="false"
                            misfireConstant="INSTRUCTION_RE_EXECUTE_JOB">
                            <set-property property="repeatCount" value="25"/>
                            <set-property property="repeatInterval" value="5000"/>
                        </trigger>
                    </trigger-group>


                  <!-- Create a Job -->
                 <job-group name="alertSenderJobGroup">
                  <!--<job name="alertSenderJob"
                    className="com.baselogic.yoursos.scheduler.jobs.AlertSenderJob"
                    description="alert Sender Job"
                    durability="true"
                    volatility="true"
                    requestsRecovery="true">
                  </job>-->
                  <job name="alertSenderJob"
                    className="com.baselogic.yoursos.scheduler.jobs.AlertSenderJob"/>

                 </job-group>

                    <!-- Schedule the Job/Trigger -->
                    <schedule job="alertSenderJob" trigger="alertSenderTrigger"/>

                    <schedule jobGroup="alertSenderJobGroup"
                     triggerGroup="alertSenderTriggerGroup"
                     job="alertSenderJob"
                     trigger="alertSenderTrigger"/>

                </quartz-config>


                WEB-INF/classes/com.baselogic.yoursos.scheduler.jobs.AlertSenderJob:

                package com.baselogic.yoursos.scheduler.jobs;

                import org.apache.commons.logging.Log;
                import org.apache.commons.logging.LogFactory;

                import org.quartz.JobExecutionContext;
                import org.quartz.JobExecutionException;
                import org.quartz.Job;

                import org.apache.commons.logging.Log;
                import org.apache.commons.logging.LogFactory;


                /**
                 * Class AlertSenderJob
                 *
                 * @author Mick Knutson
                 */
                public class AlertSenderJob implements Job
                {
                    /** The <code>Log</code> instance for this application. */
                    private Log log = LogFactory.getLog( getClass().getName() );

                    /**
                     * Constructor AlertSenderJob
                     *
                     *
                     */
                    public AlertSenderJob()
                    {
                        log.info( "initialize AlertSenderJob" );
                    }

                    /**
                     * Method execute
                     *
                     * @param jobExecCtx
                     * @throws org.quartz.JobExecutionException
                     */
                    public void execute( JobExecutionContext jobExecCtx )
                            throws org.quartz.JobExecutionException
                    {
                        log.info( "Executing AlertSenderJob. This is the only operation this
job performs." );
                    }

                }



                ---
                Thanks
                Mick Knutson
                http://www.baselogic.com

                +001(805) 563-0666 Office
                +001 (708) 570-2772 Fax
                ---

                ----- Original Message ----- 
                From: "Tom Howe" <trhowe@uchicago.edu>
                To: "'Mick Knutson'" <mickknutson@hotmail.com>
                Sent: Thursday, September 25, 2003 9:10 AM
                Subject: RE: Quartz plugin shutdown problem


                > Sure, send them to me.  Just so you know, I just started looking at it
                > yesterday, so I can't guarantee I'll be hugely useful :), but I'll take
                > a look at it, at least.
                > 
                > -Tom
                > 
                > -----Original Message-----
                > From: Mick Knutson [mailto:mickknutson@hotmail.com] 
                > Sent: Thursday, September 25, 2003 11:09 AM
                > To: thowe@src.uchicago.edu
                > Subject: Re: Quartz plugin shutdown problem
                > 
                > 
                > I know you are having issues of your own, but I don't suppose that you
                > could help me with just getting my Quartz to work at?
                > 
                > I can send you the recent emails. I would appreciate it so much as I
                > have been killing myself for 3 days now and can't get it to work at all.
                > 
                > ---
                > Thanks
                > Mick Knutson
                > http://www.baselogic.com
                > 
                > +001(805) 563-0666 Office
                > +001 (708) 570-2772 Fax
                > ---
                > 
                > ----- Original Message ----- 
                > From: "Tom Howe" <thowe@src.uchicago.edu>
                > To: <struts-user@jakarta.apache.org>
                > Sent: Thursday, September 25, 2003 9:01 AM
                > Subject: 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
                > >
                > >
                > 
                > 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message