Bugs item #424287, was updated on 2001-05-15 10:41
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=424287&group_id=22866

Category: JBossServer
Group: v2.2 (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Sacha Labourey (slaboure)
Assigned to: Nobody/Anonymous (nobody)
Summary: Dynamic classes downloading not working

Initial Comment:
The current dynamic class downloading (from Jboss web 
server) feature cannot work for remote host or applets.

Reason: the URL classloader associated to the RMI stub 
points to a file URL of the JBoss server filesystem 
(deploy subdir) instead of a http://theserver:8080/ 
URL reachable from distant host. Consequently, when 
unmarshalling the stubs, the RMI subsystem won't be 
able to download missing classes from the JBoss web 
server.

Details:
========
In org.jboss.ejb.ContainerFactory.deploy (line 342 and 
around), we have
this:

      // create the _real_ classloader for this app
      ClassLoader cl = new URLClassLoader( jarUrls,
Thread.currentThread().getContextClassLoader() );
      app.setClassLoader( cl );

      for( int i = 0; i < jarUrls.length; i++ )
       deploy( app, jarUrls[ i ], cl );

      // Init application
      app.init();
      // Start application
      app.start();

      // Add to webserver so client can access classes 
through dynamic class
downloading
      WebServiceMBean webServer = (WebServiceMBean)
BeanProxy.create( WebServiceMBean.class, 
WebServiceMBean.OBJECT_NAME );

      webServer.addClassLoader( cl );


=>
        - a new classloader is created for the 
application
        - each jar of the application is deployed 
thanks to this newly created CL
        - the webserver is extended with our new CL so 
that it is able to also
provide this application classes

BUT when we deploy an application through the deploy 
directory, jarUrls will
point to a *file* URL 
(e.g. /c:/jboss/tmp/deploy/default/myBean.jar).
Consequently, when the RMI engine will create the home 
and remote stub, it
will set its codebase to the URLClassLoader URL and 
*not* to the webService
URL.

        => the client, potentially located on another 
host, will try to download
the missing class from a *file path* that does not 
exist on its system and
not from a http URL (the one of our webservicembean)


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

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

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to