-
1. Re: Scheduler Confusion
adrian.brock Jan 9, 2002 3:57 PM (in response to sridharmandava)Didn't you already post this as
Scheduler not working
I answered it there.
Regards,
Adrian -
2. Re: Scheduler Confusion
sridharmandava Jan 9, 2002 5:29 PM (in response to sridharmandava)I have tried ur fix.I have changed it to fully qualified classpath.Its not working.
I have the same code for both the classes(ScheduledDataRemover and SchedulableExample).but I don't know one works and one doesn't work.
----------ScheduledDataRemover-----------
import org.jboss.util.Schedulable;
import java.util.Date;
public class ScheduledDataRemover
implements Schedulable
{
private String mName;
private int mValue;
public ScheduledDataRemover(
String pName,
int pValue
) {
mName = pName;
mValue = pValue;
}
/**
* Just log the call
**/
public void perform(Date pTimeOfCall,long pRemainingRepetitions)
{
System.out.println( "------------ScheduledDataRemover is called at: " + pTimeOfCall +
", remaining repetitions: " + pRemainingRepetitions +
", test, name: " + mName + ", value: " + mValue );
}
}
-----------------------
help me if I have any bug in my code..
my mbean element is
The error message I am getting is--->
[Configuration] Could not create MBean :service=Scheduler(org.jboss.util.Schedul
er)
[Configuration] java.security.InvalidParameterException: Given class com.proflue
nt.manager.common.ScheduledDataRemover is not valid or not found
[Configuration] at org.jboss.util.Scheduler.setSchedulableClass(Schedule
r.java:351)
[Configuration] at org.jboss.util.Scheduler.(Scheduler.java:120)
[Configuration] at java.lang.reflect.Constructor.newInstance(Native Meth
od)
[Configuration] at com.sun.management.jmx.MBeanServerImpl.internal_insta
ntiate(MBeanServerImpl.java:2210)
[Configuration] at com.sun.management.jmx.MBeanServerImpl.createMBean(MB
eanServerImpl.java:761)
[Configuration] at org.jboss.configuration.ConfigurationService.create(C
onfigurationService.java:579)
[Configuration] at org.jboss.configuration.ConfigurationService.loadConf
iguration(ConfigurationService.java:381)
[Configuration] at java.lang.reflect.Method.invoke(Native Method)
[Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
rverImpl.java:1628)
[Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
rverImpl.java:1523)
[Configuration] at org.jboss.Main.(Main.java:213)
[Configuration] at org.jboss.Main$1.run(Main.java:127)
[Configuration] at java.security.AccessController.doPrivileged(Native Me
thod)
[Configuration] at org.jboss.Main.main(Main.java:123)
I clearly don't know whats going on..
Thanks in advance.
-Sridhar Mandava. -
3. Re: Scheduler Confusion
adrian.brock Jan 9, 2002 5:37 PM (in response to sridharmandava)Have you put your class into a jar and added it to
$JBOSS_HOME/lib/ext?
You'll need to restart the server on 2.4
With 3.0 you can hot-deploy services :-)
Regards,
Adrian -
4. Re: Scheduler Confusion
sridharmandava Jan 9, 2002 6:28 PM (in response to sridharmandava)Thank U Adrian.
My env got messsed up..Anyway that helps me to solve the problem.