User: starksm
Date: 01/06/09 12:34:44
Modified: src/main/org/jboss/ejb ContainerFactory.java
Log:
Update dynamic class loading to fix bug #424287
Revision Changes Path
1.73 +8 -4 jboss/src/main/org/jboss/ejb/ContainerFactory.java
Index: ContainerFactory.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/ContainerFactory.java,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- ContainerFactory.java 2001/06/04 22:55:15 1.72
+++ ContainerFactory.java 2001/06/09 19:34:44 1.73
@@ -44,6 +44,7 @@
import org.jboss.logging.ConsoleLoggingMBean;
import org.jboss.util.MBeanProxy;
+import org.jboss.web.WebClassLoader;
import org.jboss.web.WebServiceMBean;
import org.jboss.ejb.plugins.*;
@@ -82,7 +83,7 @@
* @author Peter Antman ([EMAIL PROTECTED])
* @author Scott Stark([EMAIL PROTECTED])
*
-* @version $Revision: 1.72 $
+* @version $Revision: 1.73 $
*/
public class ContainerFactory
extends org.jboss.util.ServiceMBeanSupport
@@ -329,8 +330,10 @@
app.setURL( appUrl );
log.log( "Deploying:" + appUrl );
- // create the _real_ classloader for this app
- ClassLoader cl = new URLClassLoader( jarUrls,
Thread.currentThread().getContextClassLoader() );
+ /* Create a subclass of URLClassLoader that allows for dynamic class
+ loading via the WebServiceMBean
+ */
+ WebClassLoader cl = new WebClassLoader( jarUrls,
Thread.currentThread().getContextClassLoader() );
app.setClassLoader( cl );
for( int i = 0; i < jarUrls.length; i++ )
@@ -343,8 +346,9 @@
// Add to webserver so client can access classes through dynamic class
downloading
WebServiceMBean webServer = (WebServiceMBean) MBeanProxy.create(
WebServiceMBean.class, WebServiceMBean.OBJECT_NAME );
+ URL[] codebase = { webServer.addClassLoader(cl) };
+ cl.setWebURLs(codebase);
- webServer.addClassLoader( cl );
// Done
log.log( "Deployed application: " + app.getName() );
// Register deployment. Use the application name in the hashtable
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development