User: user57
Date: 02/02/26 20:46:35
Modified: src/main/org/jboss/system/server ServerLoader.java
Log:
o simplest thing that should fix cl issues on init and start,
perhaps not the best solution...
Revision Changes Path
1.4 +15 -21 jboss-system/src/main/org/jboss/system/server/ServerLoader.java
Index: ServerLoader.java
===================================================================
RCS file:
/cvsroot/jboss/jboss-system/src/main/org/jboss/system/server/ServerLoader.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ServerLoader.java 27 Feb 2002 02:01:18 -0000 1.3
+++ ServerLoader.java 27 Feb 2002 04:46:35 -0000 1.4
@@ -50,7 +50,7 @@
* server.shutdown();
* </pre>
*
- * @version <tt>$Revision: 1.3 $</tt>
+ * @version <tt>$Revision: 1.4 $</tt>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a>
*/
public class ServerLoader
@@ -205,7 +205,12 @@
}
/**
- * Load a {@link Server} instance.
+ * Load a {@link Server} instance.
+ *
+ * <p>
+ * <b>NOTE</b>: This call will replace the
+ * thread context classloader with the classloader used to load
+ * the server class.
*
* @parent The parent of any class loader created during boot.
* @return An uninitialized (and unstarted) Server instance.
@@ -214,25 +219,14 @@
*/
public Server load(final ClassLoader parent) throws Exception
{
- Server server;
-
- // Save the current loader so we can restore it.
- ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
-
- try {
- // get the boot lib list
- URL[] urls = getBootClasspath();
- URLClassLoader classLoader = new URLClassLoader(urls, parent);
- Thread.currentThread().setContextClassLoader(classLoader);
-
- // construct a new Server instance
- String typename = props.getProperty(ServerConfig.SERVER_TYPE,
DEFAULT_SERVER_TYPE);
- server = createServer(typename, classLoader);
- }
- finally {
- // Restore the previous classloader
- Thread.currentThread().setContextClassLoader(oldClassLoader);
- }
+ // get the boot lib list
+ URL[] urls = getBootClasspath();
+ URLClassLoader classLoader = new URLClassLoader(urls, parent);
+ Thread.currentThread().setContextClassLoader(classLoader);
+
+ // construct a new Server instance
+ String typename = props.getProperty(ServerConfig.SERVER_TYPE,
DEFAULT_SERVER_TYPE);
+ Server server = createServer(typename, classLoader);
// thats all folks, have fun
return server;
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development