Quartz scheduler on jBoss instance

Hi,
In our project we are using quartz to schedule the jobs. Some jobs we need to tie up with certain instance of the JBOss server. By default the jobs would run on all the instances. But I want to restrict this.
The instances would have the wars/ears in which the java class are present. But only in certain instances only the scheduler or java class have to run
I am using Jboss 4.3 The quartz all jar is present in Jboss lib itself. I am using Spring 2.5 and JSF 2.0
Let me know how to do this. I am breaking my head and searching a lot in google

So can you explain to yourself why you are asking questions about JBoss in "java programming" and not in say.... the JBoss forums? Or at least the Enterprise Javabeans forum :/ But I see that you just lazily dump all your questions in Java programming...
https://community.jboss.org/en/jbossas?view=discussions

Similar Messages

  • Quartz Scheduler in Oracle SOA 10g clustered environment

    Hi,
    I was able to successfully test the usage of Quartz scheduler in our Oracle SOA 10g dev environment. Our dev is single instance where as our Test and Prod are clustered. I would like to know if the scheduler works in clustered environment. I wasn't able to find any documentation specific to Quartz for Bpel. If it can be done can you provide some guidance.
    I really appreciate your help
    Jagan.

    Jagan
    The schedulers do work on cluster environment. The trick is that every node has its oc4j containers, so you will need to deploy the scheduler process to every node in the cluster.
    Suppose you have two nodes, and have a requirement to run certain process every two hours. You schedule the process in DEV environment to run every two hours. But in cluster you will specify to run every four hours on both the nodes. In simple explanation, node 1 will fire the process at 0,4,8, ... hours and node 2 will fire at 2, 6, 10, ... hours. So, the result is that your process is still running every two hours.
    Hope this will help ...

  • Quartz Scheduled Application not working. Please help...

    Hi All,
    I have deployed a WAR file which has implemented Quartz Scheduler to run a job.
    There were no errors in the whitelist scan, but while deploying I found an error in the server log as shown below
    "BEA-000903 [Net]" "Incident Error"
    I could not make out what the error was, but I am using a listener class to run the scheduler as below in my web.xml.
    <listener>
      <listener-class>com.crmit.scheduler.QuartzSchedulerListener</listener-class>
    </listener>
    Can anyone please advice??
    Regards,
    Abhishek

    Can you please check your service logs to see what errors are reported in the logs. The Logs can be accessed using Java Service Console,
    Please refer Administering Oracle Java Cloud Service - Release 13.1

  • Deployment Queries related to Quartz Scheduler for SOA 11g???

    Dear All,
    We are using Quartz Scheduler for SOA 11g and have queries on its testing:
    1. Can we change the cron expression(say, previously cron expression was with the interval of 15 minutes every hour and we are changing it to 5 minutes every hour) in the scheduler table after we deployed the scheduler application? Should this require redeployment of Scheduler Application or the scheduler java class needs to be be run again to trigger the newly updated cron expression. Or, Will commiting the scheduler details table alone update the application to schedule for every 5 minutes in an hour?
    2. Also, if we are trying to schedule a new application(say, previously only 2 of our applications are scheduled and trying to add newly built application in the Scheduler table), will commiting the table alone will schedule the new application or require redeployment of Scheduler Application or the scheduler java class needs to be be run again?
    Please share your thoughts!
    Thanks in advance

    Were you able to control the frequency from the table. Can you please share the detials..

  • Add or remove job dynamically in Quartz Scheduler using c#

    Hi,
    is it possible to add ,update, remove jobs and trigger to quartz scheduler dynamically.just like reading from database and add jobs and trigger to scheduler .Or using a GUI to add ,edit and remove the jobs and triggers to scheduler while scheduler is running.
    please share your ideas and sample.

    Hi, As it appears to be a Java library, I suggest you re-ask this question on Quartz Scheduler community forums (http://www.quartz-scheduler.org/community) Regards, Nick.

  • "Quartz Scheduler failed to initialize" error in application log

    We are BIPublisher 10.1.3.4 as J2EE app and I am getting this error in the application log. I have created myDS datasource to get rid of the following error. But no success..
    Please Help..
    Thanks!
    Srini
    09/01/09 15:13:43.298 [ecid: 10.39.38.45:96428:1231514019135:0,0] 10.1.3.3.0 Started
    09/01/09 15:13:46.492 [ecid: 10.39.38.45:96428:1231514019135:0,0] xmlpserver: QuartzInitializer: Quartz Initializer Servlet loaded, initializing Scheduler...
    09/01/09 15:16:55.835 [ecid: 10.39.38.45:96428:1231514019135:0,0] xmlpserver: QuartzInitializer: Quartz Scheduler failed to initialize: org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'myDS': org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: Io exception: The Network Adapter could not establish the connection [See nested exception: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: Io exception: The Network Adapter could not establish the connection]]
    09/01/09 15:16:55.837 [ecid: 10.39.38.45:96428:1231514019135:0,0] xmlpserver: Error preloading servlet
    javax.servlet.ServletException: Failure occured during job recovery.
    at org.quartz.ee.servlet.QuartzInitializerServlet.init(QuartzInitializerServlet.java:170)
    at oracle.apps.xdo.servlet.scheduler.quartz.ExtendedQuartzInitializerServlet.init(ExtendedQuartzInitializerServlet.java:124)
    at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2371)
    at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4824)
    at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4748)
    at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4936)
    at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1145)
    at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:741)
    at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:414)
    at com.evermind.server.Application.getHttpApplication(Application.java:570)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1987)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:1906)
    at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:643)
    at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:290)
    at com.evermind.server.http.HttpServer.setSites(HttpServer.java:270)
    at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:177)
    at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2493)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1042)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
    at java.lang.Thread.run(Thread.java:619)

    Pl see if ML Doc 738967.1 helps
    HTH
    Srini

  • ActivationAgent in bpel.xml and Quartz Scheduler

    Hi,
    i have added to bpel.xml to schedule my BPEL process.
    <activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent"
    partnerLink="FileFtpInboundPL" heartBeatInterval="10">
    <property name="schedulerCallout">DefaultSchedulerCalloutImpl</property>
    <property name="endpointScheduleOn">0 1 * * * ?</property>
    <property name="endpointScheduleOff">0 2 * * * ?</property>
    </activationAgent>
    Can anybody tell me like
    what is role of quartz scheduler in this case?
    Is this above code related to quartz scheduler?
    what is the BPM concept befing this scheduling property?
    Thanks inadvance. It would be great help.
    Edited by: PraveenT2 on Apr 16, 2009 7:15 AM
    Edited by: PraveenT2 on Apr 16, 2009 7:16 AM

    Hi,
    Thank you for the reply.
    Yes,bpel.xml is replaced by composite.xml but i was talking about sceduling the BPEL processes through bpml.xml files.
    The example of which is given in following URL but is related to 10.x version and not 11G:
    Re: How to schedule to invoke BPEL process
    Thank you.

  • Quartz Scheduler

    Hi all ,
    We have a requirement to implement Scheduler to our BPEL Processes ,
    Can any one help me out in this .
    Any document for Quartz Scheduler .
    Thanks,
    Karthik

    The pdf document from Oracle suggests putting the scheduler on Admin server, maybe because the developer was using SOA Suite for developers.
    However, if we have Admin Server and SOA Server separate (typically the case in an organisation), then is it advisable to deploy the scheduler on SOA Server instead of Admin server. Has anybody faced any issues.
    Thanks in advance.

  • Force the web server url to hit the particular jboss instance(slot)

    Is there a way we can force the web server url to hit the particular jboss instance(slot)? I remember we can do in DAS by passing the drp port in the webserver url.
    Edited by: 865729 on 20-Jun-2011 01:30

    This isn't the best forum for this question (you might get better results posting this to the JBoss coummunity: [http://community.jboss.org|http://community.jboss.org] ) but I think you can accomplish this by putting a dummy jsessionid in the URL (on the first request so that no jsessionid exists) and appending the jvmroute of the instance you want to hit. The jvmroute is what determines which instance mod_jk routes the request to so theoretically this should work.
    - George

  • PropertyAccessExceptionsException in quartz scheduler with Spring

    Exception:
    org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: PropertyAccessExceptionsException (1 errors)]
         at org.quartz.core.JobRunShell.run(JobRunShell.java:214)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
        * Nested Exception (Underlying Cause) ---------------
        PropertyAccessExceptionsException (1 errors)
        org.springframework.beans.MethodInvocationException: Property 'methodInvoker' threw exception; nested exception is com.sun.enterprise.InvocationException
        Caused by:
        com.sun.enterprise.InvocationException
         at com.sun.enterprise.distributedtx.UserTransactionImpl.getStatus(UserTransactionImpl.java:249)
         at org.springframework.transaction.jta.JtaTransactionManager.isExistingTransaction(JtaTransactionManager.java:605)
         at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:294)
         at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:234)
         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:93)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
         at $Proxy32.toString(Unknown Source)
         at java.lang.String.valueOf(String.java:2615)
         at java.lang.StringBuffer.append(StringBuffer.java:220)
         at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.setMethodInvoker(MethodInvokingJobDetailFactoryBean.java:190)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:737)
         at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:575)
         at org.springframework.beans.AbstractPropertyAccessor.setPropertyValue(AbstractPropertyAccessor.java:49)
         at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:68)
         at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:85)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)All works fine in tomcat.
    Any body can help me?

    Project Properties -> J2EE Application (then see Embedded OC4J Command Line)
    Searching Google for "jdeveloper userthreads" finds this one in the first hit, as does searching this forum for "userThreads"
    A better title for your post would have been "How do I set userThreads option in JDeveloper" - Quartz Scheduler is what I would call a "red herring" ;)
    best,
    John

  • Trouble executing quartz scheduler

    Hi All,
    I am trying to run this eample http://www.roseindia.net/quartz/quartz-scheduler-tutorial.shtml
    When I run the helloSchedule as a java application I get this
    Exception in thread "main" java.lang.NoSuchMethodError: org.apache.commons.collections.SetUtils.orderedSet(Ljava/util/Set;)Ljava/util/Set;
         at org.quartz.JobDetail.<init>(JobDetail.java:85)
         at com.aexp.ctrdb.schedule.HelloSchedule.<init>(HelloSchedule.java:14)
         at com.aexp.ctrdb.schedule.HelloSchedule.main(HelloSchedule.java:21)
    Also how should I instantiate the scheduler from the web application?
    Thanks

    Downloaded the collections API from http://commons.apache.org/downloads/download_collections.cgi
    Still the same.

  • Oracle 11g  Quartz Scheduler 1.8.5 running under JBOSS 5.1

    Basically I'm getting this error when running Quartz configured for the jobStore
    org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
    I've got two data sources setup.
    One data source is setup to be looked up via JNDI (presumably for the one that may participate in distributed JTA XA transactions) and one that
    supposedly is not to participate in JTA transactions in which quartz can call commit/rollback on it's own.
    The problem I'm seeing with the interaction of the two is the following exception:
    05:21:27,292 ERROR [TxPolicy] javax.ejb.EJBTransactionRolledbackException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [9
    9999]; error code [29875];
    --- The error occurred in XXXXX_COORDINATE_SqlMap.xml.
    --- The error occurred while applying a parameter map.
    --- Check the XXXX_COORDINATE.insert-InlineParameterMap.
    --- Check the statement (update failed).
    --- Cause: java.sql.SQLException: ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
    ORA-29400: data cartridge error
    ORA-14450: attempt to access a transactional temp table already in use
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 720
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 225
    ; nested exception is com.XXXXXibatis.common.jdbc.exception.NestedSQLException:
    --- The error occurred in XXXXX_COORDINATE_SqlMap.xml.
    --- The error occurred while applying a parameter map.
    --- Check the XXXXX_COORDINATE.insert-InlineParameterMap.
    --- Check the statement (update failed).
    --- Cause: java.sql.SQLException: ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
    ORA-29400: data cartridge error
    ORA-14450: attempt to access a transactional temp table already in use
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 720
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 225
    Has anyone seen this error before with the following configuration of Quartz 1.8.5, Oracle 11g, Oracle Spatial?
    I've googled and seen reference to Oracle spatial using temp tables and not compatible with transactions... but not sure
    exactly how to solve this problem.
    Thanks in advacce.

    Hi;
    Can any one advise me where and how can I download proper RPM packages and how do I resolve swap space requirement failure as mentioned above. Please let me know if further information required.You can find all related rpm from your DVD. For rpm please see below thread:
    RPM confirmation
    Re: Package install for oracle11gr2
    For swap:
    swap size increase-linux
    How to increase swap size?
    Regard
    Helios

  • How to specify timezone in quartz scheduler

    Hi,
    I want to initiate a job at a particular time - 6 AM EST every Monday. The cron expression can help me do "6 AM every Monday" part, but not the EST part. How do I specify a timezone. I could not find any examples pertaining to doing this in quartz used in a web application. I found some links that talked about doing this in spring framework - http://forum.springsource.org/archive/index.php/t-16381.html
    My web.xml currently looks like this:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <description>Empty web.xml file for Web Application</description>
    <!--servlet>
    <servlet-name>QuartzInitializer</servlet-name>
    <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    <init-param>
    <param-name>config-file</param-name>
    <param-value>bpel_quartz.properties</param-value>
    </init-param>
    </servlet-->
    <servlet>
    <servlet-name>BPELSchedulerServlet</servlet-name>
    <servlet-class>com.otn.samples.BPELSchedulerServlet</servlet-class>
    <init-param>
    <param-name>cronExpr</param-name>
    <param-value>0 0 6 ? * MON</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>BPELSchedulerServlet</servlet-name>
    <url-pattern>/bpelschedulerservlet</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    </web-app>
    TIA
    Amit

    Thanks, I followed your suggestion and was able to make this work. Here is what I have done.
    In Web.xml, added a new init parameter, timezone.
    <servlet>
    <servlet-name>BPELSchedulerServlet</servlet-name>
    <servlet-class>com.otn.samples.BPELSchedulerServlet</servlet-class>
    <init-param>
    <param-name>cronExpr</param-name>
    <param-value>0 30 6 ? * MON</param-value> <!--Mondays 6:30amEST -->
    </init-param>
    <init-param>
    <param-name>timezone</param-name>
    <param-value>EST</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    then in the scheduler servlet,
    String cronExprFromWebXml = null;
    // Get the cron Expression as an Init parameter
    cronExprFromWebXml = getInitParameter("cronExpr");
    String timezone = getInitParameter("timezone");
    String cronExpr = convertCronExpr(cronExprFromWebXml,timezone);
    and I wrote a function in the same file,
    public String convertCronExpr(String inputCronExpr, String desiredTimezone)
    String outputCronExpr="";
    String[] inputCronArray = inputCronExpr.split(" ");
    String dateInDesiredFormat = inputCronArray[0]+":"+inputCronArray[1]+":"+inputCronArray[2]+":"+desiredTimezone;
    String dateInServerFormat;
    DateFormat genFormat = new SimpleDateFormat("s:m:k:z");
    Date specifiedTime;
    try
    specifiedTime = genFormat.parse(dateInDesiredFormat);
    genFormat.setTimeZone(TimeZone.getDefault());//This gets the server timezone
    dateInServerFormat = genFormat.format(specifiedTime);
    String[] outputCronArray = dateInServerFormat.split(":");
    outputCronExpr = outputCronArray[0]+" "+outputCronArray[1]+" "+outputCronArray[2]+" "+inputCronArray[3]+" "+inputCronArray[4]+" "+inputCronArray[5];
    System.out.print("inputCronExpr "+inputCronExpr);
    System.out.println(" --- In "+desiredTimezone);
    System.out.print("outputCronExpr "+outputCronExpr);
    System.out.println(" --- In soa suite timezone,"+TimeZone.getDefault().getDisplayName());
    return outputCronExpr;
    catch (ParseException e)
    return inputCronExpr;
    ofcourse I havent done any error handling here, and the code really works only for the given situation (it would fail if we use other forms of the cron expression..)
    -Amit

  • How to set schedule in JBOSS 3.x?

    As you know, JBOSS can set schedule to do something. So I want to use this facility to schedule a task. The task is as follows,
    1. At 23h59'59 everyday, the task will be done.
    2. Or At 23h59'59 in the last date of month, the task will be done.
    I use Jboss 3.2.1 and schedule_service.xml. So how can I config this xml file for two above tasks.
    I found the config code for the period timer, but in my case, it cannot be in useful. See the following,
    <server>
    <classpath codebase="lib" archives="scheduler-plugin.jar,scheduler-telephony.jar"/>
    <mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=Scheduler">
    <attribute name="StartAtStartup">true</attribute>
    <attribute name="SchedulableClass">com.cdit.telephony.schedule.OracleSchedule</attribute>
    <attribute name="SchedulableArguments">Schedulabe call,InfogateOracleDS</attribute>
    <attribute name="SchedulableArgumentTypes">java.lang.String,java.lang.String</attribute>
    <attribute name="InitialStartDate">0</attribute>
    <attribute name="SchedulePeriod">5000</attribute>
    <attribute name="InitialRepetitions">-1</attribute>
    </mbean>
    </server>
    Thanks in advance!

    Hope you haven't been waiting for two years for this but for sake of reference:
    1) You could write your own code that is scheduled to run frequently, say every minute, and then when this is fired off you work out for yourself if its not time to do anything usefull. Basically you get polled and you manage your own list of taks.
    2) You can make use of InitialStartDate and SchedulePeriod to make jobs fire at set times a day. Read up on the docs for jboss and you'll see that you can set the start date in the past and then set the schedule period to a day in milliseconds to get a job run once every day. eg:
    <attribute name="InitialStartDate">01/01/1970 13:12</attribute>
    <attribute name="InitialRepetitions">-1</attribute>
    <attribute name="SchedulePeriod">86400000</attribute>
    would run at 1:12pm every day (The Initial Start Date is in your locale format). I think you'd need to use a combination of daily run jobs and your own date checking, to try and get something run on the last day of every month.

  • Scheduling Scenarios - Multiple instances of scenario

    Hi
    I am using the scheduler to schedule a scenario that has a large number of cdc packages. The scenario usually takes 7/8 mins to complete.
    I have set the schedule to execute the scenario hourly at 30 mins past the hour.
    The execution cycle is set to many times (10) with 30 seconds interval between repititions.
    However sometimes the scenario can take longer to complete, so the execution cycle will not have completed when the next cyclye begins (i.e. + 1 hour).
    The upshot of this is that I end up with 2 or more instances of the same scenario running at the same time. This causes conflicts because C$ and I$ tables are being deleted, populated etc from different instances.
    I would ideally like to set up the scenarios so that they will not start while another instance is running.
    I've tried doing this with variables, but variables in one instance are not available in other instance (have tried everything here).
    I also heard there was a way of running scenarios synchronously, but this only appears to be available if you run using startscen.sh - I would prefer to use scheduler.
    I'm aware there is a way of adding session number to C$ and I$ filenames, but surely there is an easier way if ODI is any good at all???
    Can anybody help me.
    Thanks in advance.

    Hi ,
    In ODI , there is a tool name "OdiStartScene" which usually use for running the scenario in the package. eg. if you have package A and want to wait for Package A to succeed then running package B , You can use this tool with "Synchronous Mode".
    And about the variable that you talking. Did you use variable in "Global" mode?
    Thanks

Maybe you are looking for