Bugs item #968759, was opened at 2004-06-08 02:54
Message generated for change (Comment added) made by genman
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=968759&group_id=22866

Category: JBossServer
Group: v3.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: J-F Daune (daune_jf)
Assigned to: Nobody/Anonymous (nobody)
Summary: Schedulable interface cannot be inherited

Initial Comment:
I have developed an abstract class implementing 
Schedulable, and when I try to deploy subclasses of this 
class, I get an error reporting that they do not 
implement Schedulable.

The cause is Scheduler.setSchedulableClass. It checks 
that the given class name implements Schedulable using 
introspection. But it only introspects the class itself, not 
the class' superclasses (in other words, it does not 'visit' 
ancestors). In my case, it is the abstract base class 
that implements Schedulable.

Here is fix:

line 551 (setSchedulableClass):
         boolean lFound = false;
         Class lClass = mSchedulableClass;
         do
         {
            Class[] lInterfaces = lClass.getInterfaces();
            for (int i = 0; i < lInterfaces.length; i++)
            {
               if (lInterfaces[i] == Schedulable.class)
               {
                  lFound = true;
                  break;
               }
            }
            lClass = lClass.getSuperclass();
         }
         while(lClass != null && !lFound);



----------------------------------------------------------------------

>Comment By: Elias Ross (genman)
Date: 2004-09-21 12:05

Message:
Logged In: YES 
user_id=556458


I fixed it similar to how you suggested.

Thank you for suggesting a fix!

----------------------------------------------------------------------

Comment By: stan (sshparker)
Date: 2004-08-06 07:50

Message:
Logged In: YES 
user_id=1098513

Please ignore my other comment;)

----------------------------------------------------------------------

Comment By: stan (sshparker)
Date: 2004-08-06 06:58

Message:
Logged In: YES 
user_id=1098513

I don't think this is a bug.  Implement your parent class as
an abstract class with an abstract process class to satisfy
the implementation.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=968759&group_id=22866


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to