Hi Sean,

First of all, thank you very much for your interest for JOnAS.

I apologize to answer to your problem so late !!!

The problem you describe is not a bug, but a 'normal working' of
using ejb-jar file as input of the EJB server.

Indeed, it is not allowed to have bean's classes visible
via the classpath, which themselves needed bean's classes
visible only via the ejb-jar file.

I explain:
The current version of the EJB server could use two distinct
class loaders:
        - a 'local' class loader
        - the 'default' class loader.
In case of the EJBServer input bean is in an ejb-jar file,
the local class loader is used to load the bean's classes
contained in the ejb-jar file.
Moreover, classes loaded via the local class loader have the
visibility of the classes loaded via the default class loader,
but the opposite is not true: classes loaded via the default
class loader have NOT the visibility of the classes loaded 
via the local class loader.
(That's why, for example, the container classes generated by the
GenIC tools must be present in the ejb-jar file.)

I hope these explanations are enough clear.
These mechanisms may probably change in a future version.

Kind regards.
Hélène.


Sean Johnson wrote:
> 
> Sean,
> 
>         Nice name by the way.
> 
>         JOnAS uses a custom class loader that has some
> bugs under 1.2 VMs and above. The class loader mentions
> the problems in comments in the code. I haven't dug into
> the problem yet but the comments in the code seem to point
> to the new security model in 1.2 and above VMs as being
> the problem. I haven't filed a bug report with the JOnAS
> folks yet. I was going to take a stab at fixing it first.
> 
>         Basically the problem is that the custom class
> loader is used if you deploy from a jar because it needs
> to find a specific ejb-jar.xml and jonas-ejb-jar.xml in
> the jar file. You are likely deploying multiple beans so
> if the normal Java class loader was used it would always find
> the first ejb-jar.xml and jonas-ejb-jar.xml file and not
> the correct files from the specific jar files you
> are trying to deploy. Anyway, the custom class loader
> is supposed to default back to loading from the class
> path if it doesn't find what it is looking for in the
> specific deployed jar but this doesn't happen. So the
> result is EVERY class not already loaded in the VM that
> your bean needs must be in the bean's jar file not in
> the classpath.
> 
>         That is one work around, the other is that you deploy
> with the XML file external from the jars so the normal
> class loader will always be used which is what we did
> because putting every class each bean needed in it's
> jar was not feasible.
> 
>         The source with the bug is
> com.lutris.classloader.MultiClassLoader in case you
> want to take a look at it.
> 
>         I copied this to e-mail the list in case anyone
> else is having this issue.
> 
> Thanks,
> Sean
> 
> > -----Original Message-----
> > From: Sean Han [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 07, 2000 10:28 AM
> > To: [EMAIL PROTECTED]
> > Subject: JonAs Deployment problem
> >
> >
> > Hi, Sean:
> >
> > I saw your post about the jar deployment problem of the casting
> > exception. I
> > got the exactly same problem. Did you find a way out? Thanks for any
> > suggestion!
> >
> > regards,
> >
> > Sean
> >

-- 
-=- Hélène JOANIN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  mailto:[EMAIL PROTECTED]    http://www-frec.bull.com
  Phone: 33.4.76.29.73.53          Fax: 33.4.76.29.76.00
 Download our EJB Server JOnAS at http://www.bullsoft.com/ejb
_______________________________________________________________
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to