User: user57
Date: 02/02/26 18:01:18
Modified: src/main/org/jboss/system/server ServerConfigImpl.java
ServerConfigImplMBean.java ServerImpl.java
ServerLoader.java
Log:
o Seperated ServerConfigImplMBean interface from ServerConfig
o re-added commented sys prop for url handler pkgs
o Fixed typo in ServerLoader
Revision Changes Path
1.2 +2 -2
jboss-system/src/main/org/jboss/system/server/ServerConfigImpl.java
Index: ServerConfigImpl.java
===================================================================
RCS file:
/cvsroot/jboss/jboss-system/src/main/org/jboss/system/server/ServerConfigImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServerConfigImpl.java 24 Feb 2002 10:24:34 -0000 1.1
+++ ServerConfigImpl.java 27 Feb 2002 02:01:18 -0000 1.2
@@ -29,10 +29,10 @@
* worry about problems with lazy construction of final URL values.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class ServerConfigImpl
- implements ServerConfigImplMBean
+ implements ServerConfig, ServerConfigImplMBean
{
/** The configuration properties to pull data from. */
private final Properties props;
1.2 +85 -8
jboss-system/src/main/org/jboss/system/server/ServerConfigImplMBean.java
Index: ServerConfigImplMBean.java
===================================================================
RCS file:
/cvsroot/jboss/jboss-system/src/main/org/jboss/system/server/ServerConfigImplMBean.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServerConfigImplMBean.java 24 Feb 2002 10:24:34 -0000 1.1
+++ ServerConfigImplMBean.java 27 Feb 2002 02:01:18 -0000 1.2
@@ -1,12 +1,18 @@
-/*
- * JBoss, the OpenSource J2EE webOS
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
+/***************************************
+ * *
+ * JBoss: The OpenSource J2EE WebOS *
+ * *
+ * Distributable under LGPL license. *
+ * See terms of license at gnu.org. *
+ * *
+ ***************************************/
package org.jboss.system.server;
+import java.io.File;
+
+import java.net.URL;
+
import javax.management.ObjectName;
import org.jboss.util.jmx.ObjectNameFactory;
@@ -15,11 +21,82 @@
* The JMX MBean interface for the <tt>ServerConfigImpl</tt> component.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public interface ServerConfigImplMBean
- extends ServerConfig
{
/** The default object name. */
ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.system:type=ServerConfig");
+
+ /**
+ * Get the configuration name of the server.
+ *
+ * @return The configuration name of the server.
+ */
+ String getConfigName();
+
+ /**
+ * Get the local home directory which the server is running from.
+ *
+ * @return The local server home directory.
+ */
+ File getHomeDir();
+
+ /**
+ * Get the directory where temporary files will be stored.
+ *
+ * @return The directory where the server stores temporary files.
+ */
+ File getTempDir();
+
+ /**
+ * Get the directory where local data will be stored.
+ *
+ * @return The directory where the server stores local data.
+ */
+ File getDataDir();
+
+ /**
+ * Get the installation URL for the server.
+ *
+ * @return The installation URL for the server.
+ */
+ URL getInstallURL();
+
+ /**
+ * Get the library URL for the server.
+ *
+ * @return The library URL for the server.
+ */
+ URL getLibraryURL();
+
+ /**
+ * Get the configuration URL for the server.
+ *
+ * @return The configuration URL for the server.
+ */
+ URL getConfigURL();
+
+ /**
+ * Get the patch URL for the server.
+ *
+ * @return The patch URL for the server.
+ */
+ URL getPatchURL();
+
+ /**
+ * Enable or disable exiting the JVM when {@link Server#shutdown} is called.
+ * If enabled, then shutdown calls {@link Server#exit}. If disabled, then
+ * only the shutdown hook will be run.
+ *
+ * @param flag True to enable calling exit on shutdown.
+ */
+ void setExitOnShutdown(boolean flag);
+
+ /**
+ * Get the current value of the exit on shutdown flag.
+ *
+ * @return The current value of the exit on shutdown flag.
+ */
+ boolean getExitOnShutdown();
}
1.5 +13 -1 jboss-system/src/main/org/jboss/system/server/ServerImpl.java
Index: ServerImpl.java
===================================================================
RCS file:
/cvsroot/jboss/jboss-system/src/main/org/jboss/system/server/ServerImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ServerImpl.java 26 Feb 2002 05:15:02 -0000 1.4
+++ ServerImpl.java 27 Feb 2002 02:01:18 -0000 1.5
@@ -44,7 +44,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a>
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
*/
public class ServerImpl
implements ServerImplMBean
@@ -111,6 +111,18 @@
// Setup JBoss URL handlers
URL.setURLStreamHandlerFactory(new
org.jboss.net.protocol.URLStreamHandlerFactory());
+
+ // this does not seem to work at the moment due to CL issues
+ /*
+ String handlerPkgs = System.getProperty("java.protocol.handler.pkgs");
+ if (handlerPkgs != null) {
+ handlerPkgs += "|org.jboss.net.protocol";
+ }
+ else {
+ handlerPkgs = "org.jboss.net.protocol";
+ }
+ System.setProperty("java.protocol.handler.pkgs", handlerPkgs);
+ */
// create a new config object from the give properties
this.config = new ServerConfigImpl(props);
1.3 +5 -4 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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ServerLoader.java 24 Feb 2002 10:24:34 -0000 1.2
+++ ServerLoader.java 27 Feb 2002 02:01:18 -0000 1.3
@@ -36,7 +36,8 @@
* loader.addLibrary("jmxri.jar");
*
* // load and initialize the server instance
- * Server server = loader.load(Thread.currentThread().getContextClassLoader());
+ * ClassLoader parent = Thread.currentThread().getContextClassLoader();
+ * Server server = loader.load(parent);
* server.init(props);
*
* // start up the server
@@ -49,7 +50,7 @@
* server.shutdown();
* </pre>
*
- * @version <tt>$Revision: 1.2 $</tt>
+ * @version <tt>$Revision: 1.3 $</tt>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a>
*/
public class ServerLoader
@@ -59,7 +60,7 @@
* the JAXP or JMX impl, users of this class should add the
* proper libraries.
*/
- public static final String DEFUALT_BOOT_LIBRARY_LIST =
+ public static final String DEFAULT_BOOT_LIBRARY_LIST =
"jaxp.jar,log4j.jar,jboss-common.jar,jboss-system.jar";
/** The default server type. */
@@ -192,7 +193,7 @@
// prepend users classpath to allow for overrides
list.addAll(extraClasspath);
- String value = props.getProperty(ServerConfig.BOOT_LIBRARY_LIST,
DEFUALT_BOOT_LIBRARY_LIST);
+ String value = props.getProperty(ServerConfig.BOOT_LIBRARY_LIST,
DEFAULT_BOOT_LIBRARY_LIST);
StringTokenizer stok = new StringTokenizer(value, ",");
while (stok.hasMoreElements()) {
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development