• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Weblogic Load Job

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there, anyone have done setting up a load job using WebLogic Platform 8.1?
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do not follow the question, could you please explain a little more. Are you trying to run a job (i.e. like a batch process)? If that's the case then you can configure the class that does the job by setting it up as a startup class. When you login to the weblogic console you will see Startup and Shutdown under the section 'Your Deployed Resources'.
 
Jimi Johnson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ajay, i was looking for a mechanism or interface to run a batch type job through weblogic.

Using startup class, the scheduling has to be program manually i suppose. Is there weblogic out-of-the-box tool or interface specifically for regular batch?
 
Ajay Reddy
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is a sample what I have done. Hope this helps.

/*
The main class that calls your implementation class.
*/
public class TimerTrigger extends Thread {

public TimerTrigger () {

long repeatTimer = 0;
Props prop = new Props();

repeatTimer = Long.valueOf(prop.getSetupParameters("REPORT_TIMER_REPEAT_SECONDS")).intValue();

Timer timer = new Timer();
timer.schedule(new ReportTask(), 0, repeatTimer);
}

public static void main (String[] args) {

TimerTrigger timerTrigger = new TimerTrigger();
Thread timerThread = new Thread(timerTrigger);
Logger.log("INFO", null, "Starting Timer Trigger Thread...");
timerThread.start();

try {
timerThread.join();
}
catch (InterruptedException e) {
DBLogger.log("ERROR", null, "Interrupted Exception Joining Timer Thread");
}
}
}

/*
Your implementation
*/
public class ReportTask extends TimerTask implements Runnable {

/* Implement your batch process here */
public void run() {

}
}
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ajay,
but this startup configuration is lost when the server is restarted right?

-Shashi
reply
    Bookmark Topic Watch Topic
  • New Topic