Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
JBossAS-3.2.6 Final
-
None
-
None
Description
SourceForge Submitter: sshparker .
OS: WinXP
JDK: 1.4.2
I believe the method, setSchedulableClass, in the
Scheduler has a bug. The class is being set in this
method from an attribute in an mbean definition during
startup, and the method tests to see if it has been
loaded and implements the Schedulable interface. It
failed for me because the class I was setting is
deployed in a jar file that is loaded after the
Scheduler is being loaded. I tried using the depends
setting for the MBean, but I still got the error
because I believe the check in the method above is
being done during the load of the xml file instead of
when the class gets deployed.
As a work around I have put the class defined in the
MBean attribute into a jar file which I placed in the
server/default/lib directory. The class is now loaded
to satisfy the requirement of the setSchedulableClass
method.
Note 1: I must still have the depends attribute so
that this functionality isn't deployed until after my
main jar. Otherwise I get errors because all of the
classes that my class depends on aren't included in the
workaround jar that I created.
Note 2: I know the MBean definition I used was correct
because I touched the file so that jboss would reload
it after startup, and the scheduler worked perfectly.
The ClassNotFoundException was thrown from the
following line:
// Try to load the Schedulable Class
mSchedulableClass =
Thread.currentThread().getContextClassLoader().loadClass(pSchedulableClass);