[jboss-cvs] JBossAS SVN: r89622 - in projects/jboss-osgi/trunk/runtime: knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jun 1 14:18:48 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-06-01 14:18:47 -0400 (Mon, 01 Jun 2009)
New Revision: 89622
Modified:
projects/jboss-osgi/trunk/runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework/EquinoxIntegration.java
projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework/KnopflerfishIntegration.java
Log:
Fallback to user.home
Modified: projects/jboss-osgi/trunk/runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework/EquinoxIntegration.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework/EquinoxIntegration.java 2009-06-01 18:18:27 UTC (rev 89621)
+++ projects/jboss-osgi/trunk/runtime/equinox/src/main/java/org/jboss/osgi/equinox/framework/EquinoxIntegration.java 2009-06-01 18:18:47 UTC (rev 89622)
@@ -122,11 +122,17 @@
// Prevent a NPE when the config area is not set
if (FrameworkProperties.getProperty(PROP_INSTALL_AREA) == null)
{
- String osgiServerHome = FrameworkProperties.getProperty(OSGI_SERVER_HOME);
- if (osgiServerHome == null)
- throw new IllegalStateException("Cannot find value for property '" + PROP_INSTALL_AREA + "' nor for '" + OSGI_SERVER_HOME + "'");
-
- FrameworkProperties.setProperty(PROP_INSTALL_AREA, osgiServerHome + "/data/equinox");
+ String osgiHome = FrameworkProperties.getProperty(OSGI_SERVER_HOME);
+ if (osgiHome != null)
+ {
+ FrameworkProperties.setProperty(PROP_INSTALL_AREA, osgiHome + "/data/equinox");
+ }
+ else
+ {
+ log.warn("Cannot find value for property '" + PROP_INSTALL_AREA + "' nor for '" + OSGI_SERVER_HOME + "'");
+ String userHome = FrameworkProperties.getProperty("user.home");
+ FrameworkProperties.setProperty(PROP_INSTALL_AREA, userHome + "/equinox");
+ }
}
// Init the Framework
Modified: projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework/KnopflerfishIntegration.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework/KnopflerfishIntegration.java 2009-06-01 18:18:27 UTC (rev 89621)
+++ projects/jboss-osgi/trunk/runtime/knopflerfish/src/main/java/org/jboss/osgi/knopflerfish/framework/KnopflerfishIntegration.java 2009-06-01 18:18:47 UTC (rev 89622)
@@ -136,11 +136,17 @@
// Prevent a NPE when the config area is not set
if (Framework.getProperty(ORG_OSGI_FRAMEWORK_DIR) == null)
{
- String osgiServerHome = Framework.getProperty(OSGI_SERVER_HOME);
- if (osgiServerHome == null)
- throw new IllegalStateException("Cannot find value for property '" + ORG_OSGI_FRAMEWORK_DIR + "' nor for '" + OSGI_SERVER_HOME + "'");
-
- Framework.setProperty(ORG_OSGI_FRAMEWORK_DIR, osgiServerHome + "/data/knopflerfish");
+ String osgiHome = Framework.getProperty(OSGI_SERVER_HOME);
+ if (osgiHome != null)
+ {
+ Framework.setProperty(ORG_OSGI_FRAMEWORK_DIR, osgiHome + "/data/knopflerfish");
+ }
+ else
+ {
+ log.warn("Cannot find value for property '" + ORG_OSGI_FRAMEWORK_DIR + "' nor for '" + OSGI_SERVER_HOME + "'");
+ String userHome = Framework.getProperty("user.home");
+ Framework.setProperty(ORG_OSGI_FRAMEWORK_DIR, userHome + "/knopflerfish");
+ }
}
// Cannot disable REGISTERSERVICEURLHANDLER
More information about the jboss-cvs-commits
mailing list