You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Warner Onstine <sw...@warneronstine.com> on 2002/07/17 16:49:00 UTC

Re: Re: Suggestions with Turbine Scheduler.]

For configuring, not much needs to be done, you will need to turn on the
Scheduler service in TurbineResources.properties file.

http://jakarta.apache.org/turbine/turbine-2/services/scheduler-service.html

Also make sure that you put your scheduled jobs in a package
com.mycompany.app.modules.scheduledjobs, or whereever you have the rest of
your modules (Actions, Screens, etc.). Just make sure that you have
scheduledjobs as the package.

-warner

----- Original Message -----
From: "Fabio Daprile" <fa...@wuerth-phoenix.com>
To: "turbine Users List" <tu...@jakarta.apache.org>
Sent: Wednesday, July 17, 2002 7:25 AM
Subject: [Fwd: Re: Suggestions with Turbine Scheduler.]


>
>
> -------- Original Message --------
> Subject: Re: Suggestions with Turbine Scheduler.
> Date: Wed, 17 Jul 2002 07:19:53 -0700
> From: "Warner Onstine" <wa...@warneronstine.com>
> To: "Fabio Daprile" <fa...@wuerth-phoenix.com>
> References: <3D...@wuerth-phoenix.com>
>
>
>
> Hi Fabio,
> I would recommend you send this to the turbine-users list, I and others
are
> more likely to help you so that others can benefit from the discussion.
>
> -warner
>
> ----- Original Message -----
> From: "Fabio Daprile"
> To:
> Sent: Wednesday, July 17, 2002 6:09 AM
> Subject: Suggestions with Turbine Scheduler.
>
>
> > Hello Warner,
> >
> > i've seen a message on the mail list of turbine that you have been able
> > to start jobs with turbine 2.2.
> > I'm currently using the tdk 2.2 with the following jars:
> >
> > torque-3.0-b2-dev.jar
> > turbine-2.2-b2-dev.jar
> > fulcrum-3.0-b2-dev.jar
> >
> > Attached are my configuration files.
> > I've got crazy trying to start a job, but no way.
> >
> > Maybe you can help me, giving me some advices on configuration or what
> else.
> > I can see that the Thread is Alive, i can get the next running time for
> > my jobs, but these are never started.
> >
> > Help will be really appreciated.
> >
> > thx in advance.
> > Greetings
> >
> > Fabio Daprile
> >
> > --
> > Fabio Daprile
> >
> > Würth-Phoenix Srl
> > Via Kravogl 4, I-39100 Bolzano
> > Tel: +39 0471/564111 - (direct 564070)
> > Fax: +39 0471/564122
> >
> > mailto:fabio.daprile@wuerth-phoenix.com
> > http://www.wuerth-phoenix.com
> > http://www.wuerth.com
> >
> >
> >
> >
>
>
> --
> Fabio Daprile
>
> Würth-Phoenix Srl
> Via Kravogl 4, I-39100 Bolzano
> Tel: +39 0471/564111 - (direct 564070)
> Fax: +39 0471/564122
>
> mailto:fabio.daprile@wuerth-phoenix.com
> http://www.wuerth-phoenix.com
> http://www.wuerth.com
>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Suggestions with Turbine Scheduler.]

Posted by Fabio Daprile <fa...@wuerth-phoenix.com>.
Hello,

I do have the stratum jar to start the torque and fulcrum components.

I do not have any Errors or Exceptions. Simply the jobs do not start.
I've checked the scheduler consiguration. All the Jobs are loaded, the 
thread is alive.

What would be interesting to know is how the thread knows when to start 
a job.
Maybe something is missing in configuration?

If necessary i will go back to TDK 2.1

Is it possible that nobody in this community can provide a simple 
application that shows that this scheduler works?
The people who have written fulcrum should be able to provide this 
sample application.
A couple of classes, just to have an example of how to make this work.

anyway,

thx for your time,

Fabio

Warner Onstine wrote:

>If I remember correctly you also need the stratum jar for the scheduled jobs
>to work.
>
>What exactly is happening, are you getting error messages? Have you checked
>the tomcat logs, catalina.out, etc.?
>
>-warner
>
>----- Original Message -----
>From: Fabio Daprile
>To: Turbine Users List
>Sent: Wednesday, July 17, 2002 8:25 AM
>Subject: Re: Suggestions with Turbine Scheduler.]
>
>
>Hello warner,
>
>the problem is that everythig you suggest is already done!
>My tasks are under com.wuerth.phoenix.bugtrack.modules.scheduledjobs.
>
>I do attach the classes i use to configure and start the scheduler.
>
>I must precise that turbine does not let me use the classes embedded in the
>Turbine Jar.
>So i have to use Fulcrum.
>
>I'm  sad because everything worked correctly in the TDK2.1
>The problems raised when i decided to shift to the TDK2.2
>
>I'll be glad to have an answer also from the people that developed the
>fulcrum package.
>
>thx!
>
>Greetings
>
>Fabio
>
>Warner Onstine wrote:
>
>Oops, didn't notice you were using fulcrum, so it should be
>http://jakarta.apache.org/turbine/fulcrum/howto/scheduler-service.html
>
>-warner
>
>----- Original Message -----
>From: "Warner Onstine" <sw...@warneronstine.com>
>To: "Turbine Users List" <tu...@jakarta.apache.org>
>Sent: Wednesday, July 17, 2002 7:49 AM
>Subject: Re: Re: Suggestions with Turbine Scheduler.]
>
>
>
>For configuring, not much needs to be done, you will need to turn on the
>Scheduler service in TurbineResources.properties file.
>
>
>
>http://jakarta.apache.org/turbine/turbine-2/services/scheduler-service.html
>
>Also make sure that you put your scheduled jobs in a package
>com.mycompany.app.modules.scheduledjobs, or whereever you have the rest of
>your modules (Actions, Screens, etc.). Just make sure that you have
>scheduledjobs as the package.
>
>-warner
>
>----- Original Message -----
>From: "Fabio Daprile" <fa...@wuerth-phoenix.com>
>To: "turbine Users List" <tu...@jakarta.apache.org>
>Sent: Wednesday, July 17, 2002 7:25 AM
>Subject: [Fwd: Re: Suggestions with Turbine Scheduler.]
>
>
>
>-------- Original Message --------
>Subject: Re: Suggestions with Turbine Scheduler.
>Date: Wed, 17 Jul 2002 07:19:53 -0700
>From: "Warner Onstine" <wa...@warneronstine.com>
>To: "Fabio Daprile" <fa...@wuerth-phoenix.com>
>References: <3D...@wuerth-phoenix.com>
>
>
>
>Hi Fabio,
>I would recommend you send this to the turbine-users list, I and others
>
>are
>
>more likely to help you so that others can benefit from the discussion.
>
>-warner
>
>----- Original Message -----
>From: "Fabio Daprile"
>To:
>Sent: Wednesday, July 17, 2002 6:09 AM
>Subject: Suggestions with Turbine Scheduler.
>
>
>
>Hello Warner,
>
>i've seen a message on the mail list of turbine that you have been
>
>able
>
>to start jobs with turbine 2.2.
>I'm currently using the tdk 2.2 with the following jars:
>
>torque-3.0-b2-dev.jar
>turbine-2.2-b2-dev.jar
>fulcrum-3.0-b2-dev.jar
>
>Attached are my configuration files.
>I've got crazy trying to start a job, but no way.
>
>Maybe you can help me, giving me some advices on configuration or what
>
>else.
>
>I can see that the Thread is Alive, i can get the next running time
>
>for
>
>my jobs, but these are never started.
>
>Help will be really appreciated.
>
>thx in advance.
>Greetings
>
>Fabio Daprile
>
>--
>Fabio Daprile
>
>Würth-Phoenix Srl
>Via Kravogl 4, I-39100 Bolzano
>Tel: +39 0471/564111 - (direct 564070)
>Fax: +39 0471/564122
>
>mailto:fabio.daprile@wuerth-phoenix.com
>http://www.wuerth-phoenix.com
>http://www.wuerth.com
>
>
>
>
>
>--
>Fabio Daprile
>
>Würth-Phoenix Srl
>Via Kravogl 4, I-39100 Bolzano
>Tel: +39 0471/564111 - (direct 564070)
>Fax: +39 0471/564122
>
>mailto:fabio.daprile@wuerth-phoenix.com
>http://www.wuerth-phoenix.com
>http://www.wuerth.com
>
>
>
>
>--
>To unsubscribe, e-mail:
>
><ma...@jakarta.apache.org>
>
>For additional commands, e-mail:
>
><ma...@jakarta.apache.org>
>
>
>
>
>--
>To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>For additional commands, e-mail:
><ma...@jakarta.apache.org>
>
>
>
>
>--
>Fabio Daprile
>
>Würth-Phoenix Srl
>Via Kravogl 4, I-39100 Bolzano
>Tel: +39 0471/564111 - (direct 564070)
>Fax: +39 0471/564122
>
>mailto:fabio.daprile@wuerth-phoenix.com
>http://www.wuerth-phoenix.com
>http://www.wuerth.com
>
>
>
>
>
>
>
>package com.wuerth.phoenix.bugtrack.modules.actions;
>
>/**
> * Title:        Bug tracking system
> * Description:  Development of a Bug Tracking and Enhancement request
>system
> * Copyright:    Copyright (c) 2001
> * Company:
> * @author Fabio Daprile
> * @version 1.0
> */
>
>//Turbine
>import org.apache.velocity.context.Context;
>import org.apache.turbine.util.RunData;
>import org.apache.fulcrum.schedule.TurbineSchedulerService;
>import org.apache.fulcrum.schedule.JobEntryPeer;
>import org.apache.fulcrum.schedule.ScheduleService;
>import org.apache.fulcrum.schedule.JobEntry;
>import org.apache.fulcrum.TurbineServices;
>import org.apache.turbine.modules.actions.VelocityAction;
>import org.apache.turbine.util.ParameterParser;
>import org.apache.torque.util.Criteria;
>
>import java.util.*;
>
>
>public class SchedulerStart extends VelocityAction
>{
>
>     public void doPerform(RunData data, Context context) throws Exception
>     {
>        Criteria _criteria = null;
>        Criteria.Criterion _criterion1 = null;
>
>        List _schedulerParams = null;
>        JobEntry je;
>        ParameterParser params = data.getParameters();
>
>        _criteria = new Criteria();
>        _criterion1 = _criteria.getNewCriterion(JobEntryPeer.JOB_ID,
>                                                 new Integer(0),
>                                                  Criteria.GREATER_THAN);
>        try
>        {
>          _schedulerParams = JobEntryPeer.doSelect(_criteria);
>        }
>        catch(Exception e)
>        {
>          e.printStackTrace();
>        }
>
>        try
>        {
>            //access the service singleton
>            TurbineSchedulerService ss =
>(TurbineSchedulerService)TurbineServices.getInstance().getService(TurbineSch
>edulerService.SERVICE_NAME);
>            ss.init();
>            ss.restart();
>            //System.out.println(ss.getJob(0).getNextRuntime());
>            System.out.println("next run " +
>((JobEntry)(ss.listJobs().get(0))).getNextRunAsString());
>
>            //set the Message
>            System.out.println("Task started successfully");
>            System.out.println("listed scheduler jobs " +
>ss.listJobs().size());
>        }
>        catch (Exception e)
>        {
>            e.printStackTrace();
>            //set the Message
>            data.setMessage("Task failed to start!");
>        }
>
>        //setTemplate(schedule,SchedulerStatus.vm);
>
>     }
>}
>
>
>
>
>
>
>package com.wuerth.phoenix.bugtrack.modules.screens;
>
>//java stuff
>import java.util.*;
>import java.io.*;
>import java.text.SimpleDateFormat;
>import javax.servlet.http.HttpSession;
>
>//turbine stuff
>import org.apache.turbine.modules.screens.VelocityScreen;
>import org.apache.turbine.util.RunData;
>import org.apache.velocity.context.Context;
>import org.apache.turbine.util.ParameterParser;
>import org.apache.torque.util.Criteria;
>import org.apache.fulcrum.schedule.JobEntryPeer;
>import org.apache.fulcrum.schedule.JobEntry;
>
>//bugtrack stuff
>import com.wuerth.phoenix.bugtrack.modules.utilclasses.IdFactory;
>import com.wuerth.phoenix.bugtrack.om.*;
>import com.wuerth.phoenix.bugtrack.modules.utilclasses.CheckPermissions;
>
>/**
> * Title:        Bug tracking system
> * Description:  Development of a Bug Tracking and Enhancement request
>system
> * Copyright:    Copyright (c) 2001
> * Company:
> * @author Fabio Daprile
> * @version 1.0
> */
>
>public class ConfigureScheduler extends SecureScreen
>{
>    /**
>     * Place all the data object in the context
>     * for use in the template.
>     */
>    public void doBuildTemplate( RunData data, Context context )
>    {
>        Criteria _criteria = null;
>        Criteria.Criterion _criterion1 = null;
>        Criteria.Criterion _criterion2 = null;
>        Criteria.Criterion _criterion3 = null;
>
>        SimpleDateFormat _sdfExtended;
>        SimpleDateFormat _sdf;
>
>        List _schedulerParams = null;
>
>        Users _user;
>
>        CheckPermissions _ckperm = new CheckPermissions();
>
>        ParameterParser _formParams;
>        HttpSession _session;
>
>        if (super.isLoggedIn(data))
>        {
>          _formParams = data.getParameters();
>          _session = data.getSession();
>
>          _sdfExtended = new SimpleDateFormat ("EEE MM-dd-yyyy hh.mm.ss
>aaa", Locale.US);
>          _sdf = new SimpleDateFormat ("EEE MM-dd-yyyy", Locale.US);
>
>          context.put("Format", _sdf);
>          context.put("ExtFormat", _sdfExtended);
>
>          _user = (Users)(_session.getAttribute("myUser")); // get
>attributes of user and ACL
>          context.put("User", _user);
>
>          context.put("TopQueues", getEntries(_user));
>
>          if (_formParams.getString("Mode").equals("save"))
>          {
>            try
>            {
>              if (!_ckperm.checkPermission(_user, null, null,
>"AdminScheduler"))
>              {
>                _formParams.add("Message","You are not allowed to enter the
>scheduler section!");
>                this.doRedirect(data, "ErrorTemplate.vm");
>              }
>
>              context.put("Messages", this.saveSchedulerConfig(data,
>context));
>            }
>            catch (Exception e)
>            {
>              e.printStackTrace();
>            }
>          }
>
>          if (!_ckperm.checkPermission(_user, null, null, "AdminScheduler"))
>          {
>            _formParams.add("Message","You are not allowed to enter the
>scheduler section!");
>            try
>            {
>              this.doRedirect(data, "ErrorTemplate.vm");
>            }
>            catch(Exception e)
>            {
>              e.printStackTrace();
>            }
>          }
>
>          _criteria = new Criteria();
>          _criterion1 = _criteria.getNewCriterion(JobEntryPeer.JOB_ID,
>                                                 new Integer(0),
>                                                  Criteria.GREATER_THAN);
>          try
>          {
>            _schedulerParams = JobEntryPeer.doSelect(_criteria);
>          }
>          catch(Exception e)
>          {
>            e.printStackTrace();
>          }
>          context.put("SchedParams", _schedulerParams);
>          context.put("schedConf", new ConfigureScheduler());
>        }
>        else
>        {
>          setTemplate(data,"Login.vm");
>        }
>    }
>
>    public Vector saveSchedulerConfig( RunData data, Context context )
>throws Exception
>    {
>      JobEntry _jobentry;
>      Hashtable _properties;
>      Vector _result = null;
>      int _queueId = 0;
>
>      Users _user = null;
>      String _userId;
>
>      String _status = "";
>      int _age;
>      int _minseverity;
>      int _maxseverity;
>      int _dest;
>      int _second;
>      int _minute;
>      int _hour;
>      int _weekday;
>      int _dayofmonth;
>      String _task = "";
>      String _email = "";
>
>      ParameterParser _formParams;
>      HttpSession _session;
>
>      Criteria _criteria = null;
>      Criteria.Criterion _criterion1 = null;
>      Criteria.Criterion _criterion2 = null;
>      Criteria.Criterion _criterion3 = null;
>      Criteria.Criterion _criterion4 = null;
>      Criteria.Criterion _criterion5 = null;
>      Criteria.Criterion _criterion6 = null;
>      Criteria.Criterion _criterion7 = null;
>      Criteria.Criterion _criterion8 = null;
>
>      Vector messages = new Vector();
>
>      _formParams = data.getParameters();
>      _session = data.getSession();
>
>      _user = (Users)(_session.getAttribute("myUser"));
>      _userId = _user.getId().toString();
>
>      _status = _formParams.getString("Status");
>      _age = _formParams.getInt("Age");
>      _minseverity = _formParams.getInt("MinSeverity");
>      _maxseverity = _formParams.getInt("MaxSeverity");
>      _dest = _formParams.getInt("Dest");
>      _second = _formParams.getInt("second");
>      _minute = _formParams.getInt("minute");
>      _hour = _formParams.getInt("hour");
>      _weekday = _formParams.getInt("weekday");
>      _dayofmonth = _formParams.getInt("dayofmonth");
>      _task = _formParams.getString("task");
>      _email = _formParams.getString("email");
>
>      if (_second < -2 || _second > 59)
>        messages.add("Valid values for second are (0-59) !");
>      else if (_minute < -2 || _minute > 59)
>        messages.add("Valid values for minute are (0-59) !");
>      else if (_hour < -2 || _hour > 23)
>        messages.add("Valid values for hours are (0-23) !");
>      else if (_weekday < -2 || _weekday > 7)
>        messages.add("Valid values for day of week are (1-7) !");
>      else if (_dayofmonth < -2 || _dayofmonth > 31)
>        messages.add("Valid values for day of month are (1-31) !");
>      else
>      {
>        _properties = new Hashtable();
>
>        _properties.put("Status", _status);
>        _properties.put("Age", new Integer(_age));
>        _properties.put("MinSeverity", new Integer(_minseverity));
>        _properties.put("MaxSeverity", new Integer(_maxseverity));
>        _properties.put("Dest", new Integer(_dest));
>
>        _criteria = new Criteria();
>
>        _criterion1 = _criteria.getNewCriterion(JobEntryPeer.JOB_SECOND,
>                                                 new Integer(_second),
>                                                  Criteria.EQUAL);
>        _criterion2 = _criteria.getNewCriterion(JobEntryPeer.JOB_MINUTE,
>                                                 new Integer(_minute),
>                                                  Criteria.EQUAL);
>        _criterion3 = _criteria.getNewCriterion(JobEntryPeer.JOB_HOUR,
>                                                 new Integer(_hour),
>                                                  Criteria.EQUAL);
>        _criterion4 = _criteria.getNewCriterion(JobEntryPeer.WEEK_DAY,
>                                                 new Integer(_weekday),
>                                                  Criteria.EQUAL);
>        _criterion5 = _criteria.getNewCriterion(JobEntryPeer.DAY_OF_MONTH,
>                                                 new Integer(_dayofmonth),
>                                                  Criteria.EQUAL);
>        _criterion6 = _criteria.getNewCriterion(JobEntryPeer.TASK,
>                                                 _task,
>                                                  Criteria.EQUAL);
>        _criterion7 = _criteria.getNewCriterion(JobEntryPeer.JOB_PROPERTY,
>                                                 _properties,
>                                                  Criteria.EQUAL);
>        _criterion8 = _criteria.getNewCriterion(JobEntryPeer.EMAIL,
>                                                 _email,
>                                                  Criteria.EQUAL);
>        _criteria.add(_criterion1);
>        _criteria.add(_criterion2);
>        _criteria.add(_criterion3);
>        _criteria.add(_criterion4);
>        _criteria.add(_criterion5);
>        _criteria.add(_criterion6);
>        _criteria.add(_criterion7);
>        _criteria.add(_criterion8);
>
>        try
>        {
>          JobEntryPeer.doInsert(_criteria);
>        }
>        catch(Exception e)
>        {
>          //System.out.println(e.getMessage());
>        }
>      }
>      return messages;
>    }
>
>    private List getEntries(Users _user)
>    {
>        Criteria _criteria;
>        Criteria.Criterion _criterion1;
>        List _results;
>        List _allQueues;
>        ListIterator _iter;
>        Queues _tempQueue;
>        try
>        {
>            _criteria = new Criteria();
>            _criterion1 = _criteria.getNewCriterion(QueuesPeer.DISABLED,
>                                                  new Integer(0),
>                                                  Criteria.EQUAL);
>            _criteria.add(_criterion1);
>            _criteria.addAscendingOrderByColumn(QueuesPeer.NAME);
>            _results = QueuesPeer.doSelect(_criteria);
>
>            _allQueues = new ArrayList();
>
>            _iter = _results.listIterator();
>
>            while(_iter.hasNext())
>            {
>              _tempQueue = (Queues)_iter.next();
>
>              if (_tempQueue.checkVisibility(_user))
>                _allQueues.add(_tempQueue);
>            }
>        }
>        catch (Exception e)
>        {
>            return null;
>        }
>
>        return _allQueues;
>    }
>
>    public Hashtable getPropertyAsHashtable(byte[] p0)
>    {
>      Hashtable prop = null;
>      try
>      {
>        ByteArrayInputStream istream = new ByteArrayInputStream(p0);
>        ObjectInputStream p = new ObjectInputStream(istream);
>
>        prop = (Hashtable)p.readObject();
>
>       }
>       catch(Exception e)
>       {e.printStackTrace();}
>       return prop;
>    }
>}
>
>
>
>package com.wuerth.phoenix.bugtrack.modules.scheduledjobs;
>
>//JDK
>import java.util.*;
>import java.io.*;
>import java.text.SimpleDateFormat;
>
>//Turbine
>import org.apache.torque.util.Criteria;
>import org.apache.fulcrum.schedule.JobEntryPeer;
>import org.apache.fulcrum.schedule.ScheduledJob;
>import org.apache.fulcrum.schedule.JobEntry;
>import org.apache.turbine.util.Log;
>import com.wuerth.phoenix.bugtrack.modules.utilclasses.SendMail;
>import org.apache.turbine.util.mail.MailMessage;
>import org.apache.turbine.services.resources.TurbineResources;
>
>//bugtrack stuff
>import com.wuerth.phoenix.bugtrack.modules.utilclasses.IdFactory;
>import com.wuerth.phoenix.bugtrack.om.*;
>import com.wuerth.phoenix.bugtrack.modules.screens.DateDelta;
>
>
>public class EscalationProcess extends ScheduledJob
>{
>    private int taskcount = 0;
>
>    /**
>     * Constructor
>     */
>     public EscalationProcess()
>     {
>         //do Task initialization here
>     }
>
>
>    /**
>     * Run the Jobentry from the scheduler queue.
>     * From ScheduledJob.
>     *
>     * @param job The job to run.
>     */
>    public void run( JobEntry job ) throws Exception
>    {
>      Criteria _criteria = null;
>      Criteria.Criterion _criterion1 = null;
>      Criteria.Criterion _criterion2 = null;
>      Criteria.Criterion _criterion3 = null;
>      Criteria.Criterion _criterion4 = null;
>      Criteria.Criterion _criterion5 = null;
>      Criteria.Criterion _criterion6 = null;
>      Criteria.Criterion _criterion7 = null;
>      Criteria.Criterion _criterion8 = null;
>
>      SimpleDateFormat _sdfExtended;
>      SimpleDateFormat _sdf;
>
>      Hashtable _property;
>
>      int _age = 0;
>      int _minseverity = 0;
>      int _maxseverity = 0;
>      int _dest = 0;
>      String _status = "";
>      String _email = "";
>      String _mailbody;
>
>      Templates _template;
>      Iterator _queuesIter;
>      Iterator _projectsIter;
>      Projects _project;
>      Queues _queue;
>      List _groups;
>      Groups _group;
>      List _ticketsList;
>      List _groupMembers;
>      Iterator _groupMembersIter;
>      List _recipients;
>      Users _user;
>
>      _sdfExtended = new SimpleDateFormat ("EEE MM-dd-yyyy hh.mm.ss aaa",
>Locale.US);
>      _sdf = new SimpleDateFormat ("EEE MM-dd-yyyy", Locale.US);
>
>      System.out.println("starting escalation process");
>
>      ByteArrayInputStream istream = new
>ByteArrayInputStream(job.getProperty());
>      ObjectInputStream p = new ObjectInputStream(istream);
>
>      _property = (Hashtable)p.readObject();
>
>      _status = (String)(_property.get("Status"));
>      _age = ((Integer)_property.get("Age")).intValue();
>      _minseverity = ((Integer)_property.get("MinSeverity")).intValue();
>      _maxseverity = ((Integer)_property.get("MaxSeverity")).intValue();
>      _dest = ((Integer)_property.get("Dest")).intValue();
>      _email = job.getEmail();
>
>      MailMessage msg = new MailMessage();
>      msg.setTo(_email);
>      msg.setSubject("EscalationProcess executed successfully!");
>      _mailbody = "The EscalationProcess succesfully executed at " +
>_sdfExtended.format(Calendar.getInstance().getTime()) + "\n" + " with
>parameters " + _property.toString();
>      msg.setBody(_mailbody);
>      msg.setFrom(TurbineResources.getString("mail.administrative.user") + "
>" + TurbineResources.getString("mail.administrative.adress"));
>
>System.out.println(TurbineResources.getString("mail.administrative.user") +
>" " + TurbineResources.getString("mail.administrative.adress"));
>
>      msg.setHost(TurbineResources.getString("mail.server"));
>      msg.send();
>
>      System.out.println("notification mail sent");
>
>      _queuesIter = this.getEntries().iterator();
>
>      while(_queuesIter.hasNext())
>      {
>        _queue = (Queues)(_queuesIter.next());
>
>        if(_dest == 1)
>        {
>          _criteria = new Criteria();
>          _criterion1 = _criteria.getNewCriterion(GroupsPeer.QUEUEID,
>                                                  _queue.getId().toString(),
>                                                  Criteria.EQUAL);
>          _criterion2= _criteria.getNewCriterion(GroupsPeer.MODERATORTYPE,
>                                                  "QueueMod",
>                                                  Criteria.EQUAL);
>
>          _criteria.add(_criterion1.and(_criterion2));
>          _groups = GroupsPeer.doSelect(_criteria);
>
>          if(_groups.isEmpty())
>            break;
>          else
>          {
>            _group = (Groups)(_groups.get(0));
>            _groupMembers = _group.getGroupmemberss();
>
>            if(_groupMembers.isEmpty())
>            {
>              break;
>            }
>            else
>            {
>              _ticketsList = this.getTickets(_age, _status, _minseverity,
>_maxseverity, _queue);
>
>              if (_ticketsList.isEmpty())
>                break;
>              else
>              {
>                _groupMembersIter = _groupMembers.iterator();
>
>                _recipients = new ArrayList();
>
>                while(_groupMembersIter.hasNext())
>                {
>                  _user =
>((Groupmembers)(_groupMembersIter.next())).getUsers();
>
>                  _recipients.add(_user);
>                }
>
>                if(_recipients.isEmpty())
>                  break;
>                else
>                {
>                  _template = new Templates();
>                  _template = _template.init("8");
>
>
>                  SendMail _snd = new SendMail();
>
>_snd.setFrom(TurbineResources.getString("mail.administrative.user") + " " +
>TurbineResources.getString("mail.administrative.adress"));
>                  _snd.setRecipientsforScheduler(_recipients);
>                  //_snd.setHost("mail.tin.it");
>                  _snd.setHost(TurbineResources.getString("mail.server"));
>                  _snd.setTickets(_ticketsList);
>                  _snd.setAge(_age);
>                  //_snd.setTicket(_ticket);
>                  //_snd.setTransaction(this);
>
>_snd.setReplyTo(TurbineResources.getString("mail.administrative.user") + " "
>+ TurbineResources.getString("mail.administrative.adress"));
>                  _snd.setTemplate(_template);
>                  _snd.send_for_scheduler();
>                }
>              }
>            }
>          }
>        }
>        else if(_dest == 2)
>        {
>
>          _projectsIter = _queue.getProjectss().iterator();
>
>          while(_projectsIter.hasNext())
>          {
>            _project = (Projects)(_projectsIter.next());
>
>            _criteria = new Criteria();
>            _criterion1 = _criteria.getNewCriterion(GroupsPeer.QUEUEID,
>                                                  _queue.getId().toString(),
>                                                  Criteria.EQUAL);
>            _criterion2 = _criteria.getNewCriterion(GroupsPeer.PROJECTID,
>
>_project.getId().toString(),
>                                                  Criteria.EQUAL);
>            _criterion3 =
>_criteria.getNewCriterion(GroupsPeer.MODERATORTYPE,
>                                                  "ProjectMod",
>                                                  Criteria.EQUAL);
>            _criteria.add(_criterion1.and(_criterion2.and(_criterion3)));
>
>            _groups = GroupsPeer.doSelect(_criteria);
>
>            if(_groups.isEmpty())
>              break;
>            else
>            {
>              _group = (Groups)(_groups.get(0));
>              _groupMembers = _group.getGroupmemberss();
>
>              if(_groupMembers.isEmpty())
>              {
>                break;
>              }
>              else
>              {
>                _ticketsList = this.getTickets(_age, _status, _minseverity,
>_maxseverity, _queue);
>
>                if (_ticketsList.isEmpty())
>                  break;
>                else
>                {
>                  _groupMembersIter = _groupMembers.iterator();
>
>                  _recipients = new ArrayList();
>
>                  while(_groupMembersIter.hasNext())
>                  {
>                    _user =
>((Groupmembers)(_groupMembersIter.next())).getUsers();
>
>                    _recipients.add(_user);
>                  }
>
>                  if(_recipients.isEmpty())
>                    break;
>                  else
>                  {
>                    _template = new Templates();
>                    _template = _template.init("8");
>
>                    SendMail _snd = new SendMail();
>
>_snd.setFrom(TurbineResources.getString("mail.administrative.user") + " " +
>TurbineResources.getString("mail.administrative.adress"));
>                    _snd.setRecipientsforScheduler(_recipients);
>                    //_snd.setHost("mail.tin.it");
>                    _snd.setHost(TurbineResources.getString("mail.server"));
>                    _snd.setTickets(_ticketsList);
>                    _snd.setAge(_age);
>                    //_snd.setTicket(_ticket);
>                    //_snd.setTransaction(this);
>
>_snd.setReplyTo(TurbineResources.getString("mail.administrative.user") + " "
>+ TurbineResources.getString("mail.administrative.adress"));
>                    _snd.setTemplate(_template);
>                    _snd.send_for_scheduler();
>                  }
>                }
>              }
>            }
>          }
>        }
>      }
>    }
>
>    private List getEntries()
>    {
>        Criteria _criteria;
>        Criteria.Criterion _criterion1;
>
>        try
>        {
>            _criteria = new Criteria();
>            _criterion1 = _criteria.getNewCriterion(QueuesPeer.DISABLED,
>                                                  new Integer(0),
>                                                  Criteria.EQUAL);
>            _criteria.add(_criterion1);
>            return QueuesPeer.doSelect(_criteria);
>        }
>        catch (Exception e)
>        {
>            return null;
>        }
>    }
>
>    private ArrayList getTickets(int _age, String _status, int _minseverity,
>int _maxseverity, Queues _queue)
>    {
>        Criteria _criteria;
>        Criteria.Criterion _criterion1;
>        Criteria.Criterion _criterion2;
>        Criteria.Criterion _criterion3;
>        Criteria.Criterion _criterion4;
>        Criteria.Criterion _criterion5;
>        Criteria.Criterion _criterion6;
>
>        Iterator _ticketsIter;
>        Tickets _ticket;
>        List _tickets;
>
>        ArrayList _ticketsList;
>
>        DateDelta _delta = new DateDelta();
>        long _dayDelta = 0;
>
>        try
>        {
>            _criteria = new Criteria();
>            _criterion1 = _criteria.getNewCriterion(TicketsPeer.DISABLED,
>new Integer(0), Criteria.EQUAL);
>            _criterion2 = _criteria.getNewCriterion(TicketsPeer.QUEUEID,
>_queue.getId().toString(), Criteria.EQUAL);
>            _criterion3 =
>_criteria.getNewCriterion(TicketsPeer.INITIALPRIORITY, new
>Integer(_minseverity), Criteria.GREATER_EQUAL);
>            _criterion4 =
>_criteria.getNewCriterion(TicketsPeer.INITIALPRIORITY, new
>Integer(_maxseverity), Criteria.LESS_EQUAL);
>
>
>_criteria.add(_criterion1.and(_criterion2.and(_criterion3.and(_criterion4)))
>);
>
>            if(!_status.equals("all"))
>            {
>              _criterion5 = _criteria.getNewCriterion(TicketsPeer.STATUS,
>_status, Criteria.EQUAL);
>
>              _criteria.and(_criterion5);
>            }
>
>            _criteria.addAscendingOrderByColumn(TicketsPeer.STATUS);
>            _criteria.addAscendingOrderByColumn(TicketsPeer.ID);
>
>            //System.out.println(_criteria.toString());
>
>            _tickets = TicketsPeer.doSelect(_criteria);
>            _ticketsIter = _tickets.iterator();
>            _ticketsList = new ArrayList();
>
>            while(_ticketsIter.hasNext())
>            {
>              _ticket = (Tickets)(_ticketsIter.next());
>
>              if(!_ticket.isMerged())
>              {
>                _dayDelta =
>_delta.getDayDelta(_ticket.getLastupdatetimestamp(),
>Calendar.getInstance().getTime());
>
>                if (_age == 1 && _dayDelta <= 7)
>                  _ticketsList.add(_ticket);
>                else if (_age == 2 && (_dayDelta > 7 && _dayDelta <= 14))
>                  _ticketsList.add(_ticket);
>                else if (_age == 3 && (_dayDelta > 14 && _dayDelta <= 21))
>                  _ticketsList.add(_ticket);
>                else if (_age == 4 && (_dayDelta > 21 && _dayDelta <= 28))
>                  _ticketsList.add(_ticket);
>                else if (_age == 5 && _dayDelta > 28)
>                  _ticketsList.add(_ticket);
>              }
>            }
>        }
>        catch (Exception e)
>        {
>            return null;
>        }
>
>        return _ticketsList;
>    }
>}
>
>
>
>
>
>
>package com.wuerth.phoenix.bugtrack.modules.scheduledjobs;
>
>//JDK
>import java.util.Date;
>
>//Turbine
>import org.apache.fulcrum.schedule.ScheduledJob;
>import org.apache.fulcrum.schedule.JobEntry;
>import org.apache.turbine.util.Log;
>import com.wuerth.phoenix.bugtrack.modules.utilclasses.SendMail;
>import org.apache.turbine.util.mail.MailMessage;
>import org.apache.turbine.services.resources.TurbineResources;
>
>
>public class SimpleScheduledJob extends ScheduledJob
>{
>    private int taskcount = 0;
>
>    /**
>     * Constructor
>     */
>     public SimpleScheduledJob()
>     {
>         //do Task initialization here
>     }
>
>
>    /**
>     * Run the Jobentry from the scheduler queue.
>     * From ScheduledJob.
>     *
>     * @param job The job to run.
>     */
>    public void run( JobEntry job ) throws Exception
>    {
>
>        System.out.println("job started");
>
>        System.out.println("Job Id=" + job.getPrimaryKeyAsString());
>        MailMessage sm = new MailMessage();
>        sm.setHost(TurbineResources.getString("mail.server"));
>        //sm.setHeaders("X-Mailer: Sendmail class, X-Priority: 1(Highest)");
>        sm.setFrom(TurbineResources.getString("mail.administrative.user") +
>" " + TurbineResources.getString("mail.administrative.adress"));
>        sm.setTo(TurbineResources.getString("mail.administrative.user") + "
>" + TurbineResources.getString("mail.administrative.adress"));
>        sm.setSubject("Job confirmation");
>        sm.setBody("Your job has been executed");
>        sm.send();
>
>        //iterate the task counter
>        taskcount++;
>    }
>}
>
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>For additional commands, e-mail: mailto:turbine-user-help@jakarta.apache.org
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>

-- 
Fabio Daprile

Würth-Phoenix Srl
Via Kravogl 4, I-39100 Bolzano
Tel: +39 0471/564111 - (direct 564070)
Fax: +39 0471/564122

mailto:fabio.daprile@wuerth-phoenix.com
http://www.wuerth-phoenix.com
http://www.wuerth.com





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Migrating from fulcrum-1.0 to fulcrum-3.0

Posted by Parox Kang <pa...@yahoo.com>.
Hi,

I have code using fulcrum-1.0.  I'd like to change
to fulcrum-3.0.

However, 3.0's version of ServiceManager deprecated
its method of getManager().

How can I get around this?

Here's the stack trace:

java.lang.NoSuchMethodError:
org.apache.fulcrum.TurbineServices: method
getManager()Lorg/apache/fulcrum/ServiceManager; not
found



__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


fulcrum-1.0.jar: ServiceManager.getManager()

Posted by Parox Kang <pa...@yahoo.com>.
Dear Mr. OpenSource,

I am trying to migrate Jserv-dependent code to Tomcat.

With turbine-3.0-dev.jar and fulcrum-3.0-b2-dev.jar in
my $tomcat/lib, I get this message:

root cause:
java.lang.NoSuchMethodError:org.apache.fulcrum.
TurbineServices: method getManager()Lorg/apache/
fulcrum/ServiceManager; not found

Only fulcrum-1.0 contains the ServiceManager.
getManager() method, so I switch from 3.0-b2-dv back
to 1.0.  It takes me further down the stack trace, but
I then get this error:

Exception occurred:
org.apache.fulcrum.InstantiationException (uncaught)
thread="Thread-2",
org.apache.fulcrum.BaseServiceBroker.getService(),
line=642, bci=164

I'd like to follow what's happening here using
tomcat's debugger, but I can't find the source code
for fulcrum-1.0 anywhere!!!

At Wit's End,
Parox

__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Suggestions with Turbine Scheduler.]

Posted by Warner Onstine <sw...@warneronstine.com>.
If I remember correctly you also need the stratum jar for the scheduled jobs
to work.

What exactly is happening, are you getting error messages? Have you checked
the tomcat logs, catalina.out, etc.?

-warner

----- Original Message -----
From: Fabio Daprile
To: Turbine Users List
Sent: Wednesday, July 17, 2002 8:25 AM
Subject: Re: Suggestions with Turbine Scheduler.]


Hello warner,

the problem is that everythig you suggest is already done!
My tasks are under com.wuerth.phoenix.bugtrack.modules.scheduledjobs.

I do attach the classes i use to configure and start the scheduler.

I must precise that turbine does not let me use the classes embedded in the
Turbine Jar.
So i have to use Fulcrum.

I'm  sad because everything worked correctly in the TDK2.1
The problems raised when i decided to shift to the TDK2.2

I'll be glad to have an answer also from the people that developed the
fulcrum package.

thx!

Greetings

Fabio

Warner Onstine wrote:

Oops, didn't notice you were using fulcrum, so it should be
http://jakarta.apache.org/turbine/fulcrum/howto/scheduler-service.html

-warner

----- Original Message -----
From: "Warner Onstine" <sw...@warneronstine.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Wednesday, July 17, 2002 7:49 AM
Subject: Re: Re: Suggestions with Turbine Scheduler.]



For configuring, not much needs to be done, you will need to turn on the
Scheduler service in TurbineResources.properties file.



http://jakarta.apache.org/turbine/turbine-2/services/scheduler-service.html

Also make sure that you put your scheduled jobs in a package
com.mycompany.app.modules.scheduledjobs, or whereever you have the rest of
your modules (Actions, Screens, etc.). Just make sure that you have
scheduledjobs as the package.

-warner

----- Original Message -----
From: "Fabio Daprile" <fa...@wuerth-phoenix.com>
To: "turbine Users List" <tu...@jakarta.apache.org>
Sent: Wednesday, July 17, 2002 7:25 AM
Subject: [Fwd: Re: Suggestions with Turbine Scheduler.]



-------- Original Message --------
Subject: Re: Suggestions with Turbine Scheduler.
Date: Wed, 17 Jul 2002 07:19:53 -0700
From: "Warner Onstine" <wa...@warneronstine.com>
To: "Fabio Daprile" <fa...@wuerth-phoenix.com>
References: <3D...@wuerth-phoenix.com>



Hi Fabio,
I would recommend you send this to the turbine-users list, I and others

are

more likely to help you so that others can benefit from the discussion.

-warner

----- Original Message -----
From: "Fabio Daprile"
To:
Sent: Wednesday, July 17, 2002 6:09 AM
Subject: Suggestions with Turbine Scheduler.



Hello Warner,

i've seen a message on the mail list of turbine that you have been

able

to start jobs with turbine 2.2.
I'm currently using the tdk 2.2 with the following jars:

torque-3.0-b2-dev.jar
turbine-2.2-b2-dev.jar
fulcrum-3.0-b2-dev.jar

Attached are my configuration files.
I've got crazy trying to start a job, but no way.

Maybe you can help me, giving me some advices on configuration or what

else.

I can see that the Thread is Alive, i can get the next running time

for

my jobs, but these are never started.

Help will be really appreciated.

thx in advance.
Greetings

Fabio Daprile

--
Fabio Daprile

Würth-Phoenix Srl
Via Kravogl 4, I-39100 Bolzano
Tel: +39 0471/564111 - (direct 564070)
Fax: +39 0471/564122

mailto:fabio.daprile@wuerth-phoenix.com
http://www.wuerth-phoenix.com
http://www.wuerth.com





--
Fabio Daprile

Würth-Phoenix Srl
Via Kravogl 4, I-39100 Bolzano
Tel: +39 0471/564111 - (direct 564070)
Fax: +39 0471/564122

mailto:fabio.daprile@wuerth-phoenix.com
http://www.wuerth-phoenix.com
http://www.wuerth.com




--
To unsubscribe, e-mail:

<ma...@jakarta.apache.org>

For additional commands, e-mail:

<ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>




--
Fabio Daprile

Würth-Phoenix Srl
Via Kravogl 4, I-39100 Bolzano
Tel: +39 0471/564111 - (direct 564070)
Fax: +39 0471/564122

mailto:fabio.daprile@wuerth-phoenix.com
http://www.wuerth-phoenix.com
http://www.wuerth.com







package com.wuerth.phoenix.bugtrack.modules.actions;

/**
 * Title:        Bug tracking system
 * Description:  Development of a Bug Tracking and Enhancement request
system
 * Copyright:    Copyright (c) 2001
 * Company:
 * @author Fabio Daprile
 * @version 1.0
 */

//Turbine
import org.apache.velocity.context.Context;
import org.apache.turbine.util.RunData;
import org.apache.fulcrum.schedule.TurbineSchedulerService;
import org.apache.fulcrum.schedule.JobEntryPeer;
import org.apache.fulcrum.schedule.ScheduleService;
import org.apache.fulcrum.schedule.JobEntry;
import org.apache.fulcrum.TurbineServices;
import org.apache.turbine.modules.actions.VelocityAction;
import org.apache.turbine.util.ParameterParser;
import org.apache.torque.util.Criteria;

import java.util.*;


public class SchedulerStart extends VelocityAction
{

     public void doPerform(RunData data, Context context) throws Exception
     {
        Criteria _criteria = null;
        Criteria.Criterion _criterion1 = null;

        List _schedulerParams = null;
        JobEntry je;
        ParameterParser params = data.getParameters();

        _criteria = new Criteria();
        _criterion1 = _criteria.getNewCriterion(JobEntryPeer.JOB_ID,
                                                 new Integer(0),
                                                  Criteria.GREATER_THAN);
        try
        {
          _schedulerParams = JobEntryPeer.doSelect(_criteria);
        }
        catch(Exception e)
        {
          e.printStackTrace();
        }

        try
        {
            //access the service singleton
            TurbineSchedulerService ss =
(TurbineSchedulerService)TurbineServices.getInstance().getService(TurbineSch
edulerService.SERVICE_NAME);
            ss.init();
            ss.restart();
            //System.out.println(ss.getJob(0).getNextRuntime());
            System.out.println("next run " +
((JobEntry)(ss.listJobs().get(0))).getNextRunAsString());

            //set the Message
            System.out.println("Task started successfully");
            System.out.println("listed scheduler jobs " +
ss.listJobs().size());
        }
        catch (Exception e)
        {
            e.printStackTrace();
            //set the Message
            data.setMessage("Task failed to start!");
        }

        //setTemplate(schedule,SchedulerStatus.vm);

     }
}






package com.wuerth.phoenix.bugtrack.modules.screens;

//java stuff
import java.util.*;
import java.io.*;
import java.text.SimpleDateFormat;
import javax.servlet.http.HttpSession;

//turbine stuff
import org.apache.turbine.modules.screens.VelocityScreen;
import org.apache.turbine.util.RunData;
import org.apache.velocity.context.Context;
import org.apache.turbine.util.ParameterParser;
import org.apache.torque.util.Criteria;
import org.apache.fulcrum.schedule.JobEntryPeer;
import org.apache.fulcrum.schedule.JobEntry;

//bugtrack stuff
import com.wuerth.phoenix.bugtrack.modules.utilclasses.IdFactory;
import com.wuerth.phoenix.bugtrack.om.*;
import com.wuerth.phoenix.bugtrack.modules.utilclasses.CheckPermissions;

/**
 * Title:        Bug tracking system
 * Description:  Development of a Bug Tracking and Enhancement request
system
 * Copyright:    Copyright (c) 2001
 * Company:
 * @author Fabio Daprile
 * @version 1.0
 */

public class ConfigureScheduler extends SecureScreen
{
    /**
     * Place all the data object in the context
     * for use in the template.
     */
    public void doBuildTemplate( RunData data, Context context )
    {
        Criteria _criteria = null;
        Criteria.Criterion _criterion1 = null;
        Criteria.Criterion _criterion2 = null;
        Criteria.Criterion _criterion3 = null;

        SimpleDateFormat _sdfExtended;
        SimpleDateFormat _sdf;

        List _schedulerParams = null;

        Users _user;

        CheckPermissions _ckperm = new CheckPermissions();

        ParameterParser _formParams;
        HttpSession _session;

        if (super.isLoggedIn(data))
        {
          _formParams = data.getParameters();
          _session = data.getSession();

          _sdfExtended = new SimpleDateFormat ("EEE MM-dd-yyyy hh.mm.ss
aaa", Locale.US);
          _sdf = new SimpleDateFormat ("EEE MM-dd-yyyy", Locale.US);

          context.put("Format", _sdf);
          context.put("ExtFormat", _sdfExtended);

          _user = (Users)(_session.getAttribute("myUser")); // get
attributes of user and ACL
          context.put("User", _user);

          context.put("TopQueues", getEntries(_user));

          if (_formParams.getString("Mode").equals("save"))
          {
            try
            {
              if (!_ckperm.checkPermission(_user, null, null,
"AdminScheduler"))
              {
                _formParams.add("Message","You are not allowed to enter the
scheduler section!");
                this.doRedirect(data, "ErrorTemplate.vm");
              }

              context.put("Messages", this.saveSchedulerConfig(data,
context));
            }
            catch (Exception e)
            {
              e.printStackTrace();
            }
          }

          if (!_ckperm.checkPermission(_user, null, null, "AdminScheduler"))
          {
            _formParams.add("Message","You are not allowed to enter the
scheduler section!");
            try
            {
              this.doRedirect(data, "ErrorTemplate.vm");
            }
            catch(Exception e)
            {
              e.printStackTrace();
            }
          }

          _criteria = new Criteria();
          _criterion1 = _criteria.getNewCriterion(JobEntryPeer.JOB_ID,
                                                 new Integer(0),
                                                  Criteria.GREATER_THAN);
          try
          {
            _schedulerParams = JobEntryPeer.doSelect(_criteria);
          }
          catch(Exception e)
          {
            e.printStackTrace();
          }
          context.put("SchedParams", _schedulerParams);
          context.put("schedConf", new ConfigureScheduler());
        }
        else
        {
          setTemplate(data,"Login.vm");
        }
    }

    public Vector saveSchedulerConfig( RunData data, Context context )
throws Exception
    {
      JobEntry _jobentry;
      Hashtable _properties;
      Vector _result = null;
      int _queueId = 0;

      Users _user = null;
      String _userId;

      String _status = "";
      int _age;
      int _minseverity;
      int _maxseverity;
      int _dest;
      int _second;
      int _minute;
      int _hour;
      int _weekday;
      int _dayofmonth;
      String _task = "";
      String _email = "";

      ParameterParser _formParams;
      HttpSession _session;

      Criteria _criteria = null;
      Criteria.Criterion _criterion1 = null;
      Criteria.Criterion _criterion2 = null;
      Criteria.Criterion _criterion3 = null;
      Criteria.Criterion _criterion4 = null;
      Criteria.Criterion _criterion5 = null;
      Criteria.Criterion _criterion6 = null;
      Criteria.Criterion _criterion7 = null;
      Criteria.Criterion _criterion8 = null;

      Vector messages = new Vector();

      _formParams = data.getParameters();
      _session = data.getSession();

      _user = (Users)(_session.getAttribute("myUser"));
      _userId = _user.getId().toString();

      _status = _formParams.getString("Status");
      _age = _formParams.getInt("Age");
      _minseverity = _formParams.getInt("MinSeverity");
      _maxseverity = _formParams.getInt("MaxSeverity");
      _dest = _formParams.getInt("Dest");
      _second = _formParams.getInt("second");
      _minute = _formParams.getInt("minute");
      _hour = _formParams.getInt("hour");
      _weekday = _formParams.getInt("weekday");
      _dayofmonth = _formParams.getInt("dayofmonth");
      _task = _formParams.getString("task");
      _email = _formParams.getString("email");

      if (_second < -2 || _second > 59)
        messages.add("Valid values for second are (0-59) !");
      else if (_minute < -2 || _minute > 59)
        messages.add("Valid values for minute are (0-59) !");
      else if (_hour < -2 || _hour > 23)
        messages.add("Valid values for hours are (0-23) !");
      else if (_weekday < -2 || _weekday > 7)
        messages.add("Valid values for day of week are (1-7) !");
      else if (_dayofmonth < -2 || _dayofmonth > 31)
        messages.add("Valid values for day of month are (1-31) !");
      else
      {
        _properties = new Hashtable();

        _properties.put("Status", _status);
        _properties.put("Age", new Integer(_age));
        _properties.put("MinSeverity", new Integer(_minseverity));
        _properties.put("MaxSeverity", new Integer(_maxseverity));
        _properties.put("Dest", new Integer(_dest));

        _criteria = new Criteria();

        _criterion1 = _criteria.getNewCriterion(JobEntryPeer.JOB_SECOND,
                                                 new Integer(_second),
                                                  Criteria.EQUAL);
        _criterion2 = _criteria.getNewCriterion(JobEntryPeer.JOB_MINUTE,
                                                 new Integer(_minute),
                                                  Criteria.EQUAL);
        _criterion3 = _criteria.getNewCriterion(JobEntryPeer.JOB_HOUR,
                                                 new Integer(_hour),
                                                  Criteria.EQUAL);
        _criterion4 = _criteria.getNewCriterion(JobEntryPeer.WEEK_DAY,
                                                 new Integer(_weekday),
                                                  Criteria.EQUAL);
        _criterion5 = _criteria.getNewCriterion(JobEntryPeer.DAY_OF_MONTH,
                                                 new Integer(_dayofmonth),
                                                  Criteria.EQUAL);
        _criterion6 = _criteria.getNewCriterion(JobEntryPeer.TASK,
                                                 _task,
                                                  Criteria.EQUAL);
        _criterion7 = _criteria.getNewCriterion(JobEntryPeer.JOB_PROPERTY,
                                                 _properties,
                                                  Criteria.EQUAL);
        _criterion8 = _criteria.getNewCriterion(JobEntryPeer.EMAIL,
                                                 _email,
                                                  Criteria.EQUAL);
        _criteria.add(_criterion1);
        _criteria.add(_criterion2);
        _criteria.add(_criterion3);
        _criteria.add(_criterion4);
        _criteria.add(_criterion5);
        _criteria.add(_criterion6);
        _criteria.add(_criterion7);
        _criteria.add(_criterion8);

        try
        {
          JobEntryPeer.doInsert(_criteria);
        }
        catch(Exception e)
        {
          //System.out.println(e.getMessage());
        }
      }
      return messages;
    }

    private List getEntries(Users _user)
    {
        Criteria _criteria;
        Criteria.Criterion _criterion1;
        List _results;
        List _allQueues;
        ListIterator _iter;
        Queues _tempQueue;
        try
        {
            _criteria = new Criteria();
            _criterion1 = _criteria.getNewCriterion(QueuesPeer.DISABLED,
                                                  new Integer(0),
                                                  Criteria.EQUAL);
            _criteria.add(_criterion1);
            _criteria.addAscendingOrderByColumn(QueuesPeer.NAME);
            _results = QueuesPeer.doSelect(_criteria);

            _allQueues = new ArrayList();

            _iter = _results.listIterator();

            while(_iter.hasNext())
            {
              _tempQueue = (Queues)_iter.next();

              if (_tempQueue.checkVisibility(_user))
                _allQueues.add(_tempQueue);
            }
        }
        catch (Exception e)
        {
            return null;
        }

        return _allQueues;
    }

    public Hashtable getPropertyAsHashtable(byte[] p0)
    {
      Hashtable prop = null;
      try
      {
        ByteArrayInputStream istream = new ByteArrayInputStream(p0);
        ObjectInputStream p = new ObjectInputStream(istream);

        prop = (Hashtable)p.readObject();

       }
       catch(Exception e)
       {e.printStackTrace();}
       return prop;
    }
}



package com.wuerth.phoenix.bugtrack.modules.scheduledjobs;

//JDK
import java.util.*;
import java.io.*;
import java.text.SimpleDateFormat;

//Turbine
import org.apache.torque.util.Criteria;
import org.apache.fulcrum.schedule.JobEntryPeer;
import org.apache.fulcrum.schedule.ScheduledJob;
import org.apache.fulcrum.schedule.JobEntry;
import org.apache.turbine.util.Log;
import com.wuerth.phoenix.bugtrack.modules.utilclasses.SendMail;
import org.apache.turbine.util.mail.MailMessage;
import org.apache.turbine.services.resources.TurbineResources;

//bugtrack stuff
import com.wuerth.phoenix.bugtrack.modules.utilclasses.IdFactory;
import com.wuerth.phoenix.bugtrack.om.*;
import com.wuerth.phoenix.bugtrack.modules.screens.DateDelta;


public class EscalationProcess extends ScheduledJob
{
    private int taskcount = 0;

    /**
     * Constructor
     */
     public EscalationProcess()
     {
         //do Task initialization here
     }


    /**
     * Run the Jobentry from the scheduler queue.
     * From ScheduledJob.
     *
     * @param job The job to run.
     */
    public void run( JobEntry job ) throws Exception
    {
      Criteria _criteria = null;
      Criteria.Criterion _criterion1 = null;
      Criteria.Criterion _criterion2 = null;
      Criteria.Criterion _criterion3 = null;
      Criteria.Criterion _criterion4 = null;
      Criteria.Criterion _criterion5 = null;
      Criteria.Criterion _criterion6 = null;
      Criteria.Criterion _criterion7 = null;
      Criteria.Criterion _criterion8 = null;

      SimpleDateFormat _sdfExtended;
      SimpleDateFormat _sdf;

      Hashtable _property;

      int _age = 0;
      int _minseverity = 0;
      int _maxseverity = 0;
      int _dest = 0;
      String _status = "";
      String _email = "";
      String _mailbody;

      Templates _template;
      Iterator _queuesIter;
      Iterator _projectsIter;
      Projects _project;
      Queues _queue;
      List _groups;
      Groups _group;
      List _ticketsList;
      List _groupMembers;
      Iterator _groupMembersIter;
      List _recipients;
      Users _user;

      _sdfExtended = new SimpleDateFormat ("EEE MM-dd-yyyy hh.mm.ss aaa",
Locale.US);
      _sdf = new SimpleDateFormat ("EEE MM-dd-yyyy", Locale.US);

      System.out.println("starting escalation process");

      ByteArrayInputStream istream = new
ByteArrayInputStream(job.getProperty());
      ObjectInputStream p = new ObjectInputStream(istream);

      _property = (Hashtable)p.readObject();

      _status = (String)(_property.get("Status"));
      _age = ((Integer)_property.get("Age")).intValue();
      _minseverity = ((Integer)_property.get("MinSeverity")).intValue();
      _maxseverity = ((Integer)_property.get("MaxSeverity")).intValue();
      _dest = ((Integer)_property.get("Dest")).intValue();
      _email = job.getEmail();

      MailMessage msg = new MailMessage();
      msg.setTo(_email);
      msg.setSubject("EscalationProcess executed successfully!");
      _mailbody = "The EscalationProcess succesfully executed at " +
_sdfExtended.format(Calendar.getInstance().getTime()) + "\n" + " with
parameters " + _property.toString();
      msg.setBody(_mailbody);
      msg.setFrom(TurbineResources.getString("mail.administrative.user") + "
" + TurbineResources.getString("mail.administrative.adress"));

System.out.println(TurbineResources.getString("mail.administrative.user") +
" " + TurbineResources.getString("mail.administrative.adress"));

      msg.setHost(TurbineResources.getString("mail.server"));
      msg.send();

      System.out.println("notification mail sent");

      _queuesIter = this.getEntries().iterator();

      while(_queuesIter.hasNext())
      {
        _queue = (Queues)(_queuesIter.next());

        if(_dest == 1)
        {
          _criteria = new Criteria();
          _criterion1 = _criteria.getNewCriterion(GroupsPeer.QUEUEID,
                                                  _queue.getId().toString(),
                                                  Criteria.EQUAL);
          _criterion2= _criteria.getNewCriterion(GroupsPeer.MODERATORTYPE,
                                                  "QueueMod",
                                                  Criteria.EQUAL);

          _criteria.add(_criterion1.and(_criterion2));
          _groups = GroupsPeer.doSelect(_criteria);

          if(_groups.isEmpty())
            break;
          else
          {
            _group = (Groups)(_groups.get(0));
            _groupMembers = _group.getGroupmemberss();

            if(_groupMembers.isEmpty())
            {
              break;
            }
            else
            {
              _ticketsList = this.getTickets(_age, _status, _minseverity,
_maxseverity, _queue);

              if (_ticketsList.isEmpty())
                break;
              else
              {
                _groupMembersIter = _groupMembers.iterator();

                _recipients = new ArrayList();

                while(_groupMembersIter.hasNext())
                {
                  _user =
((Groupmembers)(_groupMembersIter.next())).getUsers();

                  _recipients.add(_user);
                }

                if(_recipients.isEmpty())
                  break;
                else
                {
                  _template = new Templates();
                  _template = _template.init("8");


                  SendMail _snd = new SendMail();

_snd.setFrom(TurbineResources.getString("mail.administrative.user") + " " +
TurbineResources.getString("mail.administrative.adress"));
                  _snd.setRecipientsforScheduler(_recipients);
                  //_snd.setHost("mail.tin.it");
                  _snd.setHost(TurbineResources.getString("mail.server"));
                  _snd.setTickets(_ticketsList);
                  _snd.setAge(_age);
                  //_snd.setTicket(_ticket);
                  //_snd.setTransaction(this);

_snd.setReplyTo(TurbineResources.getString("mail.administrative.user") + " "
+ TurbineResources.getString("mail.administrative.adress"));
                  _snd.setTemplate(_template);
                  _snd.send_for_scheduler();
                }
              }
            }
          }
        }
        else if(_dest == 2)
        {

          _projectsIter = _queue.getProjectss().iterator();

          while(_projectsIter.hasNext())
          {
            _project = (Projects)(_projectsIter.next());

            _criteria = new Criteria();
            _criterion1 = _criteria.getNewCriterion(GroupsPeer.QUEUEID,
                                                  _queue.getId().toString(),
                                                  Criteria.EQUAL);
            _criterion2 = _criteria.getNewCriterion(GroupsPeer.PROJECTID,

_project.getId().toString(),
                                                  Criteria.EQUAL);
            _criterion3 =
_criteria.getNewCriterion(GroupsPeer.MODERATORTYPE,
                                                  "ProjectMod",
                                                  Criteria.EQUAL);
            _criteria.add(_criterion1.and(_criterion2.and(_criterion3)));

            _groups = GroupsPeer.doSelect(_criteria);

            if(_groups.isEmpty())
              break;
            else
            {
              _group = (Groups)(_groups.get(0));
              _groupMembers = _group.getGroupmemberss();

              if(_groupMembers.isEmpty())
              {
                break;
              }
              else
              {
                _ticketsList = this.getTickets(_age, _status, _minseverity,
_maxseverity, _queue);

                if (_ticketsList.isEmpty())
                  break;
                else
                {
                  _groupMembersIter = _groupMembers.iterator();

                  _recipients = new ArrayList();

                  while(_groupMembersIter.hasNext())
                  {
                    _user =
((Groupmembers)(_groupMembersIter.next())).getUsers();

                    _recipients.add(_user);
                  }

                  if(_recipients.isEmpty())
                    break;
                  else
                  {
                    _template = new Templates();
                    _template = _template.init("8");

                    SendMail _snd = new SendMail();

_snd.setFrom(TurbineResources.getString("mail.administrative.user") + " " +
TurbineResources.getString("mail.administrative.adress"));
                    _snd.setRecipientsforScheduler(_recipients);
                    //_snd.setHost("mail.tin.it");
                    _snd.setHost(TurbineResources.getString("mail.server"));
                    _snd.setTickets(_ticketsList);
                    _snd.setAge(_age);
                    //_snd.setTicket(_ticket);
                    //_snd.setTransaction(this);

_snd.setReplyTo(TurbineResources.getString("mail.administrative.user") + " "
+ TurbineResources.getString("mail.administrative.adress"));
                    _snd.setTemplate(_template);
                    _snd.send_for_scheduler();
                  }
                }
              }
            }
          }
        }
      }
    }

    private List getEntries()
    {
        Criteria _criteria;
        Criteria.Criterion _criterion1;

        try
        {
            _criteria = new Criteria();
            _criterion1 = _criteria.getNewCriterion(QueuesPeer.DISABLED,
                                                  new Integer(0),
                                                  Criteria.EQUAL);
            _criteria.add(_criterion1);
            return QueuesPeer.doSelect(_criteria);
        }
        catch (Exception e)
        {
            return null;
        }
    }

    private ArrayList getTickets(int _age, String _status, int _minseverity,
int _maxseverity, Queues _queue)
    {
        Criteria _criteria;
        Criteria.Criterion _criterion1;
        Criteria.Criterion _criterion2;
        Criteria.Criterion _criterion3;
        Criteria.Criterion _criterion4;
        Criteria.Criterion _criterion5;
        Criteria.Criterion _criterion6;

        Iterator _ticketsIter;
        Tickets _ticket;
        List _tickets;

        ArrayList _ticketsList;

        DateDelta _delta = new DateDelta();
        long _dayDelta = 0;

        try
        {
            _criteria = new Criteria();
            _criterion1 = _criteria.getNewCriterion(TicketsPeer.DISABLED,
new Integer(0), Criteria.EQUAL);
            _criterion2 = _criteria.getNewCriterion(TicketsPeer.QUEUEID,
_queue.getId().toString(), Criteria.EQUAL);
            _criterion3 =
_criteria.getNewCriterion(TicketsPeer.INITIALPRIORITY, new
Integer(_minseverity), Criteria.GREATER_EQUAL);
            _criterion4 =
_criteria.getNewCriterion(TicketsPeer.INITIALPRIORITY, new
Integer(_maxseverity), Criteria.LESS_EQUAL);


_criteria.add(_criterion1.and(_criterion2.and(_criterion3.and(_criterion4)))
);

            if(!_status.equals("all"))
            {
              _criterion5 = _criteria.getNewCriterion(TicketsPeer.STATUS,
_status, Criteria.EQUAL);

              _criteria.and(_criterion5);
            }

            _criteria.addAscendingOrderByColumn(TicketsPeer.STATUS);
            _criteria.addAscendingOrderByColumn(TicketsPeer.ID);

            //System.out.println(_criteria.toString());

            _tickets = TicketsPeer.doSelect(_criteria);
            _ticketsIter = _tickets.iterator();
            _ticketsList = new ArrayList();

            while(_ticketsIter.hasNext())
            {
              _ticket = (Tickets)(_ticketsIter.next());

              if(!_ticket.isMerged())
              {
                _dayDelta =
_delta.getDayDelta(_ticket.getLastupdatetimestamp(),
Calendar.getInstance().getTime());

                if (_age == 1 && _dayDelta <= 7)
                  _ticketsList.add(_ticket);
                else if (_age == 2 && (_dayDelta > 7 && _dayDelta <= 14))
                  _ticketsList.add(_ticket);
                else if (_age == 3 && (_dayDelta > 14 && _dayDelta <= 21))
                  _ticketsList.add(_ticket);
                else if (_age == 4 && (_dayDelta > 21 && _dayDelta <= 28))
                  _ticketsList.add(_ticket);
                else if (_age == 5 && _dayDelta > 28)
                  _ticketsList.add(_ticket);
              }
            }
        }
        catch (Exception e)
        {
            return null;
        }

        return _ticketsList;
    }
}






package com.wuerth.phoenix.bugtrack.modules.scheduledjobs;

//JDK
import java.util.Date;

//Turbine
import org.apache.fulcrum.schedule.ScheduledJob;
import org.apache.fulcrum.schedule.JobEntry;
import org.apache.turbine.util.Log;
import com.wuerth.phoenix.bugtrack.modules.utilclasses.SendMail;
import org.apache.turbine.util.mail.MailMessage;
import org.apache.turbine.services.resources.TurbineResources;


public class SimpleScheduledJob extends ScheduledJob
{
    private int taskcount = 0;

    /**
     * Constructor
     */
     public SimpleScheduledJob()
     {
         //do Task initialization here
     }


    /**
     * Run the Jobentry from the scheduler queue.
     * From ScheduledJob.
     *
     * @param job The job to run.
     */
    public void run( JobEntry job ) throws Exception
    {

        System.out.println("job started");

        System.out.println("Job Id=" + job.getPrimaryKeyAsString());
        MailMessage sm = new MailMessage();
        sm.setHost(TurbineResources.getString("mail.server"));
        //sm.setHeaders("X-Mailer: Sendmail class, X-Priority: 1(Highest)");
        sm.setFrom(TurbineResources.getString("mail.administrative.user") +
" " + TurbineResources.getString("mail.administrative.adress"));
        sm.setTo(TurbineResources.getString("mail.administrative.user") + "
" + TurbineResources.getString("mail.administrative.adress"));
        sm.setSubject("Job confirmation");
        sm.setBody("Your job has been executed");
        sm.send();

        //iterate the task counter
        taskcount++;
    }
}







--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail: mailto:turbine-user-help@jakarta.apache.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Suggestions with Turbine Scheduler.]

Posted by Fabio Daprile <fa...@wuerth-phoenix.com>.
Hello warner,

the problem is that everythig you suggest is already done!
My tasks are under com.wuerth.phoenix.bugtrack.modules.scheduledjobs.

I do attach the classes i use to configure and start the scheduler.

I must precise that turbine does not let me use the classes embedded in 
the Turbine Jar.
So i have to use Fulcrum.

I'm  sad because everything worked correctly in the TDK2.1
The problems raised when i decided to shift to the TDK2.2

I'll be glad to have an answer also from the people that developed the 
fulcrum package.

thx!

Greetings

Fabio

Warner Onstine wrote:

>Oops, didn't notice you were using fulcrum, so it should be
>http://jakarta.apache.org/turbine/fulcrum/howto/scheduler-service.html
>
>-warner
>
>----- Original Message -----
>From: "Warner Onstine" <sw...@warneronstine.com>
>To: "Turbine Users List" <tu...@jakarta.apache.org>
>Sent: Wednesday, July 17, 2002 7:49 AM
>Subject: Re: Re: Suggestions with Turbine Scheduler.]
>
>
>  
>
>>For configuring, not much needs to be done, you will need to turn on the
>>Scheduler service in TurbineResources.properties file.
>>
>>
>>    
>>
>http://jakarta.apache.org/turbine/turbine-2/services/scheduler-service.html
>  
>
>>Also make sure that you put your scheduled jobs in a package
>>com.mycompany.app.modules.scheduledjobs, or whereever you have the rest of
>>your modules (Actions, Screens, etc.). Just make sure that you have
>>scheduledjobs as the package.
>>
>>-warner
>>
>>----- Original Message -----
>>From: "Fabio Daprile" <fa...@wuerth-phoenix.com>
>>To: "turbine Users List" <tu...@jakarta.apache.org>
>>Sent: Wednesday, July 17, 2002 7:25 AM
>>Subject: [Fwd: Re: Suggestions with Turbine Scheduler.]
>>
>>
>>    
>>
>>>-------- Original Message --------
>>>Subject: Re: Suggestions with Turbine Scheduler.
>>>Date: Wed, 17 Jul 2002 07:19:53 -0700
>>>From: "Warner Onstine" <wa...@warneronstine.com>
>>>To: "Fabio Daprile" <fa...@wuerth-phoenix.com>
>>>References: <3D...@wuerth-phoenix.com>
>>>
>>>
>>>
>>>Hi Fabio,
>>>I would recommend you send this to the turbine-users list, I and others
>>>      
>>>
>>are
>>    
>>
>>>more likely to help you so that others can benefit from the discussion.
>>>
>>>-warner
>>>
>>>----- Original Message -----
>>>From: "Fabio Daprile"
>>>To:
>>>Sent: Wednesday, July 17, 2002 6:09 AM
>>>Subject: Suggestions with Turbine Scheduler.
>>>
>>>
>>>      
>>>
>>>>Hello Warner,
>>>>
>>>>i've seen a message on the mail list of turbine that you have been
>>>>        
>>>>
>able
>  
>
>>>>to start jobs with turbine 2.2.
>>>>I'm currently using the tdk 2.2 with the following jars:
>>>>
>>>>torque-3.0-b2-dev.jar
>>>>turbine-2.2-b2-dev.jar
>>>>fulcrum-3.0-b2-dev.jar
>>>>
>>>>Attached are my configuration files.
>>>>I've got crazy trying to start a job, but no way.
>>>>
>>>>Maybe you can help me, giving me some advices on configuration or what
>>>>        
>>>>
>>>else.
>>>      
>>>
>>>>I can see that the Thread is Alive, i can get the next running time
>>>>        
>>>>
>for
>  
>
>>>>my jobs, but these are never started.
>>>>
>>>>Help will be really appreciated.
>>>>
>>>>thx in advance.
>>>>Greetings
>>>>
>>>>Fabio Daprile
>>>>
>>>>--
>>>>Fabio Daprile
>>>>
>>>>W�rth-Phoenix Srl
>>>>Via Kravogl 4, I-39100 Bolzano
>>>>Tel: +39 0471/564111 - (direct 564070)
>>>>Fax: +39 0471/564122
>>>>
>>>>mailto:fabio.daprile@wuerth-phoenix.com
>>>>http://www.wuerth-phoenix.com
>>>>http://www.wuerth.com
>>>>
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>--
>>>Fabio Daprile
>>>
>>>W�rth-Phoenix Srl
>>>Via Kravogl 4, I-39100 Bolzano
>>>Tel: +39 0471/564111 - (direct 564070)
>>>Fax: +39 0471/564122
>>>
>>>mailto:fabio.daprile@wuerth-phoenix.com
>>>http://www.wuerth-phoenix.com
>>>http://www.wuerth.com
>>>
>>>
>>>
>>>      
>>>
>>--
>>To unsubscribe, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>  
>
>>For additional commands, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>  
>
>>    
>>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>

-- 
Fabio Daprile

W�rth-Phoenix Srl
Via Kravogl 4, I-39100 Bolzano
Tel: +39 0471/564111 - (direct 564070)
Fax: +39 0471/564122

mailto:fabio.daprile@wuerth-phoenix.com
http://www.wuerth-phoenix.com
http://www.wuerth.com




Re: Re: Suggestions with Turbine Scheduler.]

Posted by Warner Onstine <sw...@warneronstine.com>.
Oops, didn't notice you were using fulcrum, so it should be
http://jakarta.apache.org/turbine/fulcrum/howto/scheduler-service.html

-warner

----- Original Message -----
From: "Warner Onstine" <sw...@warneronstine.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Wednesday, July 17, 2002 7:49 AM
Subject: Re: Re: Suggestions with Turbine Scheduler.]


> For configuring, not much needs to be done, you will need to turn on the
> Scheduler service in TurbineResources.properties file.
>
>
http://jakarta.apache.org/turbine/turbine-2/services/scheduler-service.html
>
> Also make sure that you put your scheduled jobs in a package
> com.mycompany.app.modules.scheduledjobs, or whereever you have the rest of
> your modules (Actions, Screens, etc.). Just make sure that you have
> scheduledjobs as the package.
>
> -warner
>
> ----- Original Message -----
> From: "Fabio Daprile" <fa...@wuerth-phoenix.com>
> To: "turbine Users List" <tu...@jakarta.apache.org>
> Sent: Wednesday, July 17, 2002 7:25 AM
> Subject: [Fwd: Re: Suggestions with Turbine Scheduler.]
>
>
> >
> >
> > -------- Original Message --------
> > Subject: Re: Suggestions with Turbine Scheduler.
> > Date: Wed, 17 Jul 2002 07:19:53 -0700
> > From: "Warner Onstine" <wa...@warneronstine.com>
> > To: "Fabio Daprile" <fa...@wuerth-phoenix.com>
> > References: <3D...@wuerth-phoenix.com>
> >
> >
> >
> > Hi Fabio,
> > I would recommend you send this to the turbine-users list, I and others
> are
> > more likely to help you so that others can benefit from the discussion.
> >
> > -warner
> >
> > ----- Original Message -----
> > From: "Fabio Daprile"
> > To:
> > Sent: Wednesday, July 17, 2002 6:09 AM
> > Subject: Suggestions with Turbine Scheduler.
> >
> >
> > > Hello Warner,
> > >
> > > i've seen a message on the mail list of turbine that you have been
able
> > > to start jobs with turbine 2.2.
> > > I'm currently using the tdk 2.2 with the following jars:
> > >
> > > torque-3.0-b2-dev.jar
> > > turbine-2.2-b2-dev.jar
> > > fulcrum-3.0-b2-dev.jar
> > >
> > > Attached are my configuration files.
> > > I've got crazy trying to start a job, but no way.
> > >
> > > Maybe you can help me, giving me some advices on configuration or what
> > else.
> > > I can see that the Thread is Alive, i can get the next running time
for
> > > my jobs, but these are never started.
> > >
> > > Help will be really appreciated.
> > >
> > > thx in advance.
> > > Greetings
> > >
> > > Fabio Daprile
> > >
> > > --
> > > Fabio Daprile
> > >
> > > Würth-Phoenix Srl
> > > Via Kravogl 4, I-39100 Bolzano
> > > Tel: +39 0471/564111 - (direct 564070)
> > > Fax: +39 0471/564122
> > >
> > > mailto:fabio.daprile@wuerth-phoenix.com
> > > http://www.wuerth-phoenix.com
> > > http://www.wuerth.com
> > >
> > >
> > >
> > >
> >
> >
> > --
> > Fabio Daprile
> >
> > Würth-Phoenix Srl
> > Via Kravogl 4, I-39100 Bolzano
> > Tel: +39 0471/564111 - (direct 564070)
> > Fax: +39 0471/564122
> >
> > mailto:fabio.daprile@wuerth-phoenix.com
> > http://www.wuerth-phoenix.com
> > http://www.wuerth.com
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>