:service=Scheduler is not registered...
shieroii Jan 19, 2004 6:31 AM
"shieroii" wrote:
Hi!
I get the following exception when I tried to configure an scheduler for testing...
13:00:30,241 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
<none>
Incompletely deployed packages:
[org.jboss.deployment.DeploymentInfo@218bb0ef { url=file:/D:/jboss-3.2.2/jboss-3.2.2/server/default/deploy/myScheduler-servic
e.xml }
deployer: org.jboss.deployment.SARDeployer@3a317a
status: Deployment FAILED reason: create operation failed for package file:/D:/jboss-3.2.2/jboss-3.2.2/server/default/deplo
y/myScheduler-service.xml; - nested throwable: (javax.management.InstanceNotFoundException: :service=Scheduler is not registe
red.)
state: FAILED
watch: file:/D:/jboss-3.2.2/jboss-3.2.2/server/default/deploy/myScheduler-service.xml
lastDeployed: 1074513613137
lastModified: 1074513613117
mbeans:
:service=Scheduler (state not available)
]MBeans waiting for classes:
<none>
MBeans waiting for other MBeans:
[ObjectName: :service=Scheduler
state: NOTYETINSTALLED
I Depend On:
Depends On Me: ]
******* here the contents of myScheduler-service.xml *******
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: myscheduler-service.xml,v 1.4.2.2 2004/1/19 11:40:03 starksm Exp $ -->
<server>
<!--This is a trial example for using scheduler!! -->
<mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=Scheduler">
<attribute name="SchedulableClass">myscheduler.MySchedulerEx1</attribute>
<attribute name="SchedulableArguments">Schedulabe Test,5</attribute>
<attribute name="SchedulableArgumentTypes">java.lang.String,long</attribute>
<attribute name="InitialStartDate">NOW</attribute>
<attribute name="SchedulePeriod">10000</attribute>
<attribute name="InitialRepetitions">5</attribute>
<attribute name="StartAtStartup">true</attribute>
</mbean>
</server>
********** here the content of MySchedulerEx1.java ********
package myscheduler;
import java.util.Date;
import org.jboss.varia.scheduler.Schedulable;
public class MySchedulerEx1 implements Schedulable {
private String mName;
private int mValue;
public MySchedulerEx1(String pName, int pValue) {
System.out.println("************ this is from MyScheduler constructor! ");
mName = pName;
mValue = pValue;
}
public void perform(Date pTimeOfCall, long pRemainingRepetitions) {
System.out.println("********* this is MyScheduler.perform: " + pTimeOfCall + ", remaining repetitions: " + pRemainingRepetitions + ", test, name: " + mName + ", value: " + mValue);
for(int i=0;i<mValue;i++)
System.out.println(" perform some operation...");
}
}
can someone tell me where am I making mistake?
thanks!