At 07:27 7.8.2000 -0700, you wrote:
>  User: mulder  
>  Date: 00/08/07 07:27:02
>
>  Modified:    src/main/org/jboss/verifier/strategy AbstractVerifier.java
>  Log:
>  Old impl incorrectly throws "does not implement interface" message if the
>  interface in question is implemented by a superclass of the (bean) class in
>  question.
>  
>  Changed to use the more accurate "isAssignableFrom" instead of
>  "getInterfaces".  This does, however, require that the interface itself
>  be on the classpath.  Do we need to wrap this in an additional try/catch
>  to catch that or would that be caught at an earlier stage?

I was hoping the Class.getInterfaces would return all interfaces from
superclasses as well. I guess not. Oh well.

Anyhow, the way that jBoss plays with the classloaders, I'd rather not
trust the classpath thingy. Could just travel the class hierarchy upwards
with getSuperClass() and check the interfaces there as well. That's what
isAssignableFrom has to do as well, no? Would just need to add recursion to
the method.

Although all the interfaces the verifier needs are in ejb.jar. And the
classloader with that jar should always be chained as a parent for the bean
classloader. I think. I think Rickard posted the classloader hierarchy
once. Hmm. 

-- Juha



Reply via email to