Author: thomas.diesler(a)jboss.com
Date: 2009-05-08 11:43:04 -0400 (Fri, 08 May 2009)
New Revision: 88450
Modified:
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiBootstrap.java
Log:
Provide jboss.bind.address with -b
Modified:
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiBootstrap.java
===================================================================
---
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiBootstrap.java 2009-05-08
15:32:50 UTC (rev 88449)
+++
projects/jboss-osgi/trunk/spi/src/main/java/org/jboss/osgi/spi/framework/OSGiBootstrap.java 2009-05-08
15:43:04 UTC (rev 88450)
@@ -107,7 +107,7 @@
public static void main(String[] args)
{
- initSystemProperties();
+ initSystemProperties(args);
OSGiBootstrapProvider bootProvider = getBootstrapProvider();
OSGiFramework framework = bootProvider.getFramework();
@@ -119,7 +119,7 @@
thread.start();
}
- private static void initSystemProperties()
+ private static void initSystemProperties(String[] args)
{
log.debug("initSystemProperties");
@@ -127,6 +127,12 @@
defaults.setProperty("jboss.bind.address", "localhost");
defaults.setProperty("java.protocol.handler.pkgs",
"org.jboss.net.protocol|org.jboss.virtual.protocol");
+ // [TODO] use args4j
+ if (args != null && args.length == 2 &&
args[0].equals("-b"))
+ {
+ defaults.setProperty("jboss.bind.address", args[1]);
+ }
+
Enumeration<?> defaultNames = defaults.propertyNames();
while(defaultNames.hasMoreElements())
{
Show replies by date