Hi Rickard,

One last thing.  (This is a bug in both ejx and jBoss, I believe.)  In
com.dreambean.ejx.ejb.Method, when you import the XML you
have a section of code that loads the method-params as follows:

         } else if (name.equals("method-params"))
        {
                      NodeList pl = n.getChildNodes();
                      for (int j = 0; j < pl.getLength(); j++)
                      {
                        p.addElement(XMLManager.getString(pl.item(j)));
                      }
        }

The problem is that this code will load non-element aspects of
code (such as carriage-returns) into the Vector p.  Later, it will fail
the following test:


                                } else if (p.size() == params.length)


I propose adding the following line of code:


                      for (int j = 0; j < pl.getLength(); j++)
                      {
---->>>>        if (pl.item(j) instanceof Element) <<<--------
                        p.addElement(XMLManager.getString(pl.item(j)));
                      }

That should solve the problem.

Thanks,

Dan


On 7 Aug 00, at 18:21, Rickard �berg wrote:

> Hi!
>
> Dan OConnor wrote:
> > 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?
>
> Hm, well there is really no need for a FileManager to have a
> classloader... the EJX framework is, in general, just a way to edit XML
> files...
>
> Will think.
>
> /Rickard
>
> --
> Rickard �berg
>
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com
>



Reply via email to