Hi,
I am trying to configure job scheduling in weblogic server.i wrote Listener ,JobScheduler and i configured listener class in weblogic-application.xml.. but iam unable to find out that schudling after deployed my application,
here iam providing the code what i did..
listener class:
import weblogic.application.ApplicationLifecycleListener;
import weblogic.application.ApplicationLifecycleEvent;
public class RSDJobListener extends ApplicationLifecycleListener {
RSDJobScheduler rsdJobScheduler;
public void preStart(ApplicationLifecycleEvent evt)
{
System.out.println("RSDJobListener
reStart Event");
}
public void postStart(ApplicationLifecycleEvent evt)
{
System.out.println( "RSDJobListener
ostStart Event");
// Start the Scheduler
rsdJobScheduler = new RSDJobScheduler();
}
public void preStop(ApplicationLifecycleEvent evt)
{
System.out.println( "RSDJobListener
reStop Event");
// Stop the Scheduler
rsdJobScheduler.cleanUp();
}
public void postStop(ApplicationLifecycleEvent evt)
{
System.out.println( "RSDJobListener
ostStop Event");
}
public static void main(String[] args)
{
System.out.println( "RSDJobListener:main method");
}
}
Scheduler class :
import weblogic.application.ApplicationLifecycleListener;
import weblogic.application.ApplicationLifecycleEvent;
public class RSDJobListener extends ApplicationLifecycleListener {
RSDJobScheduler rsdJobScheduler;
public void preStart(ApplicationLifecycleEvent evt)
{
System.out.println("RSDJobListener
reStart Event");
}
public void postStart(ApplicationLifecycleEvent evt)
{
System.out.println( "RSDJobListener
ostStart Event");
// Start the Scheduler
rsdJobScheduler = new RSDJobScheduler();
}
public void preStop(ApplicationLifecycleEvent evt)
{
System.out.println( "RSDJobListener
reStop Event");
// Stop the Scheduler
rsdJobScheduler.cleanUp();
}
public void postStop(ApplicationLifecycleEvent evt)
{
System.out.println( "RSDJobListener
ostStop Event");
}
public static void main(String[] args)
{
System.out.println( "RSDJobListener:main method");
}
}
and weblogic-application.xml
<weblogic-application>
<listener>
<listener-class>com.oppen.rsd.batch.RSDJobListener</listener-class>
</listener>
</weblogic-application>
please give me the solution for my problem,it is not giving any error.. but it is not calling the scheduler.
Thanks&Regards
Naresh