Hi,

 

I have written a class that implements
org.jboss.varia.scheduler.Schedulable.

When I activate the Scheduler through the jmx console then my scheduled
class works as expected.

 

However I need the scheduling to being automatically when the server is
started.

I have the following entry in scheduler-service.xml

 

 

<mbean code="org.jboss.varia.scheduler.Scheduler"

             name=":service=Scheduler">

    <attribute name="StartAtStartup">true</attribute>

    <attribute
name="SchedulableClass">org.coppercore.delegate.TimerSchedule</attribute
>

    <attribute name="InitialStartDate">0</attribute>

    <attribute name="SchedulePeriod">60000</attribute>

    <attribute name="InitialRepetitions">-1</attribute>

  </mbean>

 

 

 

The SchedulableClass, "org.coppercore.delegate.TimerSchedule" is
packaged inside an ear file that Jboss deploys. However it appears that
the class loading occurs after the Scheduler mbean is instatiated as I
get the following error in my server log.

 

 

 

[org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete
Deployment listing:

 

--- MBeans waiting for other MBeans ---

ObjectName: jboss:service=Scheduler

  State: FAILED

  Reason: org.jboss.deployment.DeploymentException: Exception setting
attribute [EMAIL PROTECTED] on mbean
jboss:service=Scheduler; - nested throwable:
(java.security.InvalidParameterException: Given class
org.coppercore.delegate.TimerSchedule is not  not found)

 

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---

ObjectName: jboss:service=Scheduler

  State: FAILED

  Reason: org.jboss.deployment.DeploymentException: Exception setting
attribute [EMAIL PROTECTED] on mbean
jboss:service=Scheduler; - nested throwable:
(java.security.InvalidParameterException: Given class
org.coppercore.delegate.TimerSchedule is not  not found)

 

 

[org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete
Deployment listing:

 

--- MBeans waiting for other MBeans ---

ObjectName: jboss:service=Scheduler

  State: FAILED

  Reason: org.jboss.deployment.DeploymentException: Exception setting
attribute [EMAIL PROTECTED] on mbean
jboss:service=Scheduler; - nested throwable:
(java.security.InvalidParameterException: Given class
org.coppercore.delegate.TimerSchedule is not  not found)

 

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---

ObjectName: jboss:service=Scheduler

  State: FAILED

  Reason: org.jboss.deployment.DeploymentException: Exception setting
attribute [EMAIL PROTECTED] on mbean
jboss:service=Scheduler; - nested throwable:
(java.security.InvalidParameterException: Given class
org.coppercore.delegate.TimerSchedule is not  not found)

 

 

Could someone tell me the best way to automatically start the Scheduler
but in such a way that the class in my ear file has been loaded.

 

Thans

 

Simon

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to