Hi Rickard,

I've found what I think is a problem in
com.dreambean.ejx.ejb.MethodPermission.  Since you're the code
owner of the EJX stuff, I wanted to run a proposed change by you.
In the addSession() and addEntity() methods, the following line of
code works in EJX:

                        ClassLoader cl =
((EjbFileManager)getBeanContext().getBeanContext().getBeanCont
ext()).getClassLoader();

However, in jBoss there is a class cast exception, because the
type is actually org.jboss.ejb.deployment.jBossFileManager.
Therefore no methods get retrieved from the class & I can't get the
metadata for any method permission working below the level of an
interface.

My proposed change is to retrieve the class loader via the common
interface of jBossFileManager and EjbFileManager:
com.dreambean.ejx.FileManager.  I would add a getClassLoader
method to FileManager and change the above line of code to:

                        ClassLoader cl =
((FileManager)getBeanContext().getBeanContext().getBeanContext(
)).getClassLoader();

Sound ok to you?

-Dan



On 7 Aug 00, at 8:51, Rickard �berg wrote:

> Hi!
>
> Dan OConnor wrote:
> > I think I've really punted retrieving this metadata...
> >
> > The following line from Container.java getMethodPermissions never
> > has any elements, but this is where I thought the actual methods
> > should be:
> >
> >           Enumeration enumMethods = interfaceNode.children();
> >           while (enumMethods.hasMoreElements())
> >
> > I'll try to figure out what I'm doing wrong tomorrow... I'm guessing
> > that you use introspection in EJX to get the method names, and
> > there is some better way to retrieve this information in the jBoss
> > runtime.  Of course, looking at the code is always better than
> > guessing, so I'd do that if it weren't so late. :-)
>
> Yeah, this might be broken. Never tested it that much since there was no
> code that used it :-)
>
> /Rickard
>
> --
> Rickard �berg
>
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com
>



Reply via email to