Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 682483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:36:03+00:00 2026-05-14T01:36:03+00:00

I’m trying to implement a WebLogic job scheduling example, to test my cluster capabilities

  • 0

I’m trying to implement a WebLogic job scheduling example, to test my cluster capabilities of fail-over on scheduled tasks (to ensure that these tasks are executed on fail over scenario).

With this in mind, I’ve been following this example and trying to configure everything accordingly. Here are the steps I’ve done so far:

  1. Configured a cluster with 1 admin
    server (AdminServer) and 2 managed
    instances (Noddy and Snoopy);
  2. Set up database tables (using Oracle
    XE): ACTIVE and WEBLOGIC_TIMERS;
  3. Set up data source to access DB and
    associated it to the scheduling
    tasks under “Settings for cluster” >
    “Scheduling”;
  4. Implemented a job (TimerListener)
    and a servlet to initialize the job
    scheduling, as follows:

.

package timedexecution;

import java.io.IOException;
import java.io.PrintWriter;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import commonj.timers.Timer;
import commonj.timers.TimerListener;
import commonj.timers.TimerManager;

public class TimerServlet extends HttpServlet {
    private static final long serialVersionUID = 1L;

    protected static void logMessage(String message, PrintWriter out){
        out.write("<p>"+ message +"</p>");
        System.out.println(message);
    }

    @Override
    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        PrintWriter out = response.getWriter();
        //
        out.println("<html>");
        out.println("<head><title>TimerServlet</title></head>");
        //
        try {
            //
            logMessage("service() entering try block to intialize the timer from JNDI", out);
            //
            InitialContext ic = new InitialContext();
            TimerManager jobScheduler = (TimerManager)ic.lookup("weblogic.JobScheduler");
            //
            logMessage("jobScheduler reference " + jobScheduler, out);
            //
            jobScheduler.schedule(new ExampleTimerListener(), 0, 30*1000);            
            //
            logMessage("Timer scheduled!", out);
            //
            //execute this job every 30 seconds
            logMessage("service() started the timer", out);
            //
            logMessage("Started the timer - status:", out);
            //
        }
        catch (NamingException ne) {
            String msg = ne.getMessage();
            logMessage("Timer schedule failed!", out);
            logMessage(msg, out);
        }
        catch (Throwable t) {
            logMessage("service() error initializing timer manager with JNDI name weblogic.JobScheduler " + t,out);
        }
        //
        out.println("</body></html>");
        out.close();
    }


    private static class ExampleTimerListener implements Serializable, TimerListener {
        private static final long serialVersionUID = 8313912206357147939L;

        public void timerExpired(Timer timer) {
            SimpleDateFormat sdf = new SimpleDateFormat();
            System.out.println( "timerExpired() called at " + sdf.format( new Date() ) );
        }
    }

}

Then I executed the servlet to start the scheduling on the first managed instance (Noddy server), which returned as expected:

(Servlet execution output)

service() entering try block to
intialize the timer from JNDI

jobScheduler reference
weblogic.scheduler.TimerServiceImpl@43b4c7

Timer scheduled!

service() started the timer

Started the timer – status:

Which resulted in the creation of 2 rows in my DB tables:

  • WEBLOGIC_TIMERS table state after servlet execution:

    “EDIT”; “TIMER_ID”; “LISTENER”; “START_TIME”; “INTERVAL”; “TIMER_MANAGER_NAME”; “DOMAIN_NAME”; “CLUSTER_NAME”;

    “”; “Noddy_1268653040156”; “[datatype]”; “1268653040156”; “30000”; “weblogic.JobScheduler”; “myCluster”; “Cluster”

  • ACTIVE table state after servlet execution:

    “EDIT”; “SERVER”; “INSTANCE”; “DOMAINNAME”; “CLUSTERNAME”; “TIMEOUT”;

    “”; “service.SINGLETON_MASTER”; “6382071947583985002/Noddy”; “QRENcluster”; “Cluster”; “10.03.15”

Although, the job is not executed as scheduled. It should print a message on the server’s log output (Noddy.out file) with a timestamp, saying that the timer had expired. It doesn’t. My log files state as follows:

Admin server log (myCluster.log file):

####<15/Mar/2010 10H45m GMT> <Warning> <Cluster> <test-ad> <Noddy> <[STANDBY] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1268649925727> <BEA-000192> <No currently living server was found that could host TimerMaster. The server will retry in a few seconds.> 

Noddy server log
(Noddy.out file):

service() entering try block to intialize the timer from JNDI
jobScheduler reference weblogic.scheduler.TimerServiceImpl@43b4c7
Timer scheduled!
service() started the timer
Started the timer - status:
<15/Mar/2010 10H45m GMT> <Warning> <Cluster> <BEA-000192> <No currently living server was found that could host TimerMaster. The server will retry in a few seconds.> 

(Noddy.log file):

####<15/Mar/2010 11H24m GMT> <Info> <Common> <test-ad> <Noddy> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1268652270128> <BEA-000628> <Created "1" resources for pool "TxDataSourceOracle", out of which "1" are available and "0" are unavailable.> 
####<15/Mar/2010 11H37m GMT> <Info> <Cluster> <test-ad> <Noddy> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1268653040226> <BEA-000182> <Job Scheduler created a job with ID Noddy_1268653040156 for TimerListener with description timedexecution.TimerServlet$ExampleTimerListener@2ce79a> 
####<15/Mar/2010 11H39m GMT> <Info> <JDBC> <test-ad> <Noddy> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1268653166307> <BEA-001128> <Connection for pool "TxDataSourceOracle" closed.> 

Can anyone help me out discovering what’s wrong with my configuration? Thanks in advance for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:36:03+00:00Added an answer on May 14, 2026 at 1:36 am

    I turned out to solve this problem by restarting the whole system and then starting WebLogic instances from the command line. In this perspective I managed to get this into working, with the output being sent to the command line.

    I’d like to thank everyone who tried to help me solving this one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.