User: user57
Date: 02/02/25 17:36:24
Modified: src/main/org/jboss/system/server ServerImpl.java
ServerInfo.java ServerInfoMBean.java
Log:
o Added getProperty() to ServerInfo (easy acess to a sys prop w/o
having to search through showProp* output)
o ServerImpl uses org.jboss.net.protocol.URLStreamHandlerFactory
instead of setting system prop
Revision Changes Path
1.3 +2 -7 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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ServerImpl.java 24 Feb 2002 10:24:34 -0000 1.2
+++ ServerImpl.java 26 Feb 2002 01:36:24 -0000 1.3
@@ -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.2 $
+ * @version $Revision: 1.3 $
*/
public class ServerImpl
implements ServerImplMBean
@@ -110,12 +110,7 @@
log.info("JBoss Release: " + jbossPackage.getImplementationTitle());
// Setup JBoss URL handlers
- String handlerPkgs = System.getProperty("java.protocol.handler.pkgs", null);
- if (handlerPkgs == null)
- handlerPkgs = "org.jboss.net.protocol";
- else
- handlerPkgs += ":org.jboss.net.protocol";
- System.setProperty("java.protocol.handler.pkgs", handlerPkgs );
+ URL.setURLStreamHandlerFactory(new
org.jboss.net.protocol.URLStreamHandlerFactory());
// create a new config object from the give properties
this.config = new ServerConfigImpl(props);
1.2 +12 -3 jboss-system/src/main/org/jboss/system/server/ServerInfo.java
Index: ServerInfo.java
===================================================================
RCS file:
/cvsroot/jboss/jboss-system/src/main/org/jboss/system/server/ServerInfo.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServerInfo.java 24 Feb 2002 10:24:34 -0000 1.1
+++ ServerInfo.java 26 Feb 2002 01:36:24 -0000 1.2
@@ -31,7 +31,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Hiram Chirino</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class ServerInfo
implements ServerInfoMBean, MBeanRegistration
@@ -255,8 +255,17 @@
info.append("</pre>\n");
}
- /** Return a Map of System.getProperties() with a toString implementation
- *that provides an html table of the key/value pairs
+ /**
+ * Get a single system property.
+ */
+ public String getProperty(String name)
+ {
+ return System.getProperty(name);
+ }
+
+ /**
+ * Return a Map of System.getProperties() with a toString implementation
+ * that provides an html table of the key/value pairs
*/
public Map showProperties()
{
1.2 +7 -2
jboss-system/src/main/org/jboss/system/server/ServerInfoMBean.java
Index: ServerInfoMBean.java
===================================================================
RCS file:
/cvsroot/jboss/jboss-system/src/main/org/jboss/system/server/ServerInfoMBean.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServerInfoMBean.java 24 Feb 2002 10:24:34 -0000 1.1
+++ ServerInfoMBean.java 26 Feb 2002 01:36:24 -0000 1.2
@@ -23,7 +23,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott Stark</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public interface ServerInfoMBean
{
@@ -50,7 +50,7 @@
* Return a listing of the active threads and thread groups.
*/
String listThreadDump();
-
+
/**
* Display the java.lang.Package info for the pkgName
*/
@@ -63,6 +63,11 @@
* @return a simple html report of this information
*/
String displayInfoForClass(String className);
+
+ /**
+ * Get a single system property.
+ */
+ String getProperty(String name);
/**
* Return a Map of System.getProperties() with a toString implementation
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development