You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by rw...@apache.org on 2011/04/25 04:45:24 UTC
svn commit: r1096396 - in /geronimo/server/trunk/framework:
configs/karaf-framework/src/main/distribution/text/etc/
configs/karaf-framework/src/main/distribution/text/etc/others/
configs/karaf-framework/src/main/filtered-resources/etc/ modules/geronimo...
Author: rwonly
Date: Mon Apr 25 02:45:23 2011
New Revision: 1096396
URL: http://svn.apache.org/viewvc?rev=1096396&view=rev
Log:
GERONIMO-5793 OSGI Bundle "Stop" doesn't work according to Hot deployed "HelloWorld" osgi bundle sample
Added:
geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/text/etc/others/
geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/text/etc/others/org.apache.felix.fileinstall-deploy.cfg
- copied unchanged from r1092565, geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/text/etc/org.apache.felix.fileinstall-deploy.cfg
geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/deployer-config.properties (with props)
Removed:
geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/text/etc/org.apache.felix.fileinstall-deploy.cfg
Modified:
geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties
geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/deployer/DeployerCLI.java
geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/FrameworkLauncher.java
Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties?rev=1096396&r1=1096395&r2=1096396&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties Mon Apr 25 02:45:23 2011
@@ -70,7 +70,7 @@ karaf.systemBundlesStartLevel=50
#
# FileMonitor properties
#
-felix.fileinstall.dir = ${karaf.base}/etc
+felix.fileinstall.dir = ${karaf.base}/etc,${karaf.base}/etc/others
felix.fileinstall.filter = .*\\.cfg
felix.fileinstall.poll = 1000
felix.fileinstall.noInitialDelay = true
Added: geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/deployer-config.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/deployer-config.properties?rev=1096396&view=auto
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/deployer-config.properties (added)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/deployer-config.properties Mon Apr 25 02:45:23 2011
@@ -0,0 +1,234 @@
+################################################################################
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+################################################################################
+
+#
+# Framework selection properties
+#
+#karaf.framework=felix
+karaf.framework=equinox
+
+karaf.framework.equinox=repository/org/eclipse/osgi/${equinox.version}/osgi-${equinox.version}.jar
+karaf.framework.felix=repository/org/apache/felix/org.apache.felix.framework/${felix.framework.version}/org.apache.felix.framework-${felix.framework.version}.jar
+
+#
+# Framework config properties.
+#
+org.osgi.framework.system.packages=org.osgi.framework; version=1.5.0, \
+ org.osgi.framework.launch; version=1.0.0, \
+ org.osgi.framework.hooks.service; version=1.0.0, \
+ org.osgi.service.packageadmin; version=1.2.0, \
+ org.osgi.service.startlevel; version=1.1.0, \
+ org.osgi.service.url; version=1.0.0, \
+ org.osgi.util.tracker; version=1.4.0 \
+ ${jre-${java.specification.version}}
+
+org.osgi.framework.system.packages.extra=\
+ sun.misc, \
+ sun.reflect, \
+ org.apache.yoko, \
+ org.apache.yoko.osgi, \
+ org.apache.yoko.rmispec.util, \
+ org.apache.karaf.jaas.boot; version=${karaf.osgi.version}, \
+ org.apache.karaf.version; version=${karaf.osgi.version}, \
+ org.apache.geronimo.main, \
+ org.apache.geronimo.cli.daemon, \
+ org.apache.geronimo.cli.client, \
+ org.apache.geronimo.cli.shutdown, \
+ org.apache.geronimo.cli.deployer, \
+ org.apache.geronimo.transformer, \
+ org.apache.geronimo.hook
+
+# javax.transaction is needed to avoid class loader constraint violation when using javax.sql
+org.osgi.framework.bootdelegation=sun.*,com.sun.*,javax.transaction,javax.transaction.*
+
+# OSGi Execution Environment
+org.osgi.framework.executionenvironment=OSGi/Minimum-1.2,J2SE-1.2,J2SE-1.3,J2SE-1.4,J2SE-1.5,JavaSE-1.6
+
+# To enable the use of the startup.properties file to control the start level:
+karaf.auto.start=startup.properties
+
+org.osgi.framework.startlevel.beginning=100
+karaf.startlevel.bundle=60
+karaf.systemBundlesStartLevel=50
+
+#
+# FileMonitor properties
+#
+felix.fileinstall.dir = ${karaf.base}/etc
+felix.fileinstall.filter = .*\\.cfg
+felix.fileinstall.poll = 1000
+felix.fileinstall.noInitialDelay = true
+
+#
+# Java platform package export properties.
+#
+
+# Standard package set. Note that:
+# - javax.transaction* is exported with a mandatory attribute
+jre-1.6=, \
+ javax.accessibility, \
+ javax.activity, \
+ javax.annotation.processing, \
+ javax.crypto, \
+ javax.crypto.interfaces, \
+ javax.crypto.spec, \
+ javax.imageio, \
+ javax.imageio.event, \
+ javax.imageio.metadata, \
+ javax.imageio.plugins.bmp, \
+ javax.imageio.plugins.jpeg, \
+ javax.imageio.spi, \
+ javax.imageio.stream, \
+ javax.jws;version="2.0", \
+ javax.jws.soap;version="2.0", \
+ javax.lang.model, \
+ javax.lang.model.element, \
+ javax.lang.model.type, \
+ javax.lang.model.util, \
+ javax.management, \
+ javax.management.loading, \
+ javax.management.modelmbean, \
+ javax.management.monitor, \
+ javax.management.openmbean, \
+ javax.management.relation, \
+ javax.management.remote, \
+ javax.management.remote.rmi, \
+ javax.management.timer, \
+ javax.naming, \
+ javax.naming.directory, \
+ javax.naming.event, \
+ javax.naming.ldap, \
+ javax.naming.spi, \
+ javax.net, \
+ javax.net.ssl, \
+ javax.print, \
+ javax.print.attribute, \
+ javax.print.attribute.standard, \
+ javax.print.event, \
+ javax.rmi, \
+ javax.rmi.CORBA, \
+ javax.rmi.ssl, \
+ javax.script, \
+ javax.security.auth, \
+ javax.security.auth.callback, \
+ javax.security.auth.kerberos, \
+ javax.security.auth.login, \
+ javax.security.auth.spi, \
+ javax.security.auth.x500, \
+ javax.security.cert, \
+ javax.security.sasl, \
+ javax.sound.midi, \
+ javax.sound.midi.spi, \
+ javax.sound.sampled, \
+ javax.sound.sampled.spi, \
+ javax.sql, \
+ javax.sql.rowset, \
+ javax.sql.rowset.serial, \
+ javax.sql.rowset.spi, \
+ javax.swing, \
+ javax.swing.border, \
+ javax.swing.colorchooser, \
+ javax.swing.event, \
+ javax.swing.filechooser, \
+ javax.swing.plaf, \
+ javax.swing.plaf.basic, \
+ javax.swing.plaf.metal, \
+ javax.swing.plaf.multi, \
+ javax.swing.plaf.synth, \
+ javax.swing.table, \
+ javax.swing.text, \
+ javax.swing.text.html, \
+ javax.swing.text.html.parser, \
+ javax.swing.text.rtf, \
+ javax.swing.tree, \
+ javax.swing.undo, \
+ javax.tools, \
+ javax.transaction; javax.transaction.xa; version=1.1; partial=true; mandatory:=partial, \
+ javax.xml, \
+ javax.xml.crypto, \
+ javax.xml.crypto.dom, \
+ javax.xml.crypto.dsig, \
+ javax.xml.crypto.dsig.dom, \
+ javax.xml.crypto.dsig.keyinfo, \
+ javax.xml.crypto.dsig.spec, \
+ javax.xml.datatype, \
+ javax.xml.namespace; version=1.0, \
+ javax.xml.parsers, \
+ javax.xml.transform, \
+ javax.xml.transform.dom, \
+ javax.xml.transform.sax, \
+ javax.xml.transform.stax, \
+ javax.xml.transform.stream, \
+ javax.xml.validation, \
+ javax.xml.xpath, \
+ org.ietf.jgss, \
+ org.omg.CORBA, \
+ org.omg.CORBA_2_3, \
+ org.omg.CORBA_2_3.portable, \
+ org.omg.CORBA.DynAnyPackage, \
+ org.omg.CORBA.ORBPackage, \
+ org.omg.CORBA.portable, \
+ org.omg.CORBA.TypeCodePackage, \
+ org.omg.CosNaming, \
+ org.omg.CosNaming.NamingContextExtPackage, \
+ org.omg.CosNaming.NamingContextPackage, \
+ org.omg.Dynamic, \
+ org.omg.DynamicAny, \
+ org.omg.DynamicAny.DynAnyFactoryPackage, \
+ org.omg.DynamicAny.DynAnyPackage, \
+ org.omg.IOP, \
+ org.omg.IOP.CodecFactoryPackage, \
+ org.omg.IOP.CodecPackage, \
+ org.omg.Messaging, \
+ org.omg.PortableInterceptor, \
+ org.omg.PortableInterceptor.ORBInitInfoPackage, \
+ org.omg.PortableServer, \
+ org.omg.PortableServer.CurrentPackage, \
+ org.omg.PortableServer.POAManagerPackage, \
+ org.omg.PortableServer.POAPackage, \
+ org.omg.PortableServer.portable, \
+ org.omg.PortableServer.ServantLocatorPackage, \
+ org.omg.SendingContext, \
+ org.omg.stub.java.rmi, \
+ org.omg.stub.javax.management.remote.rmi, \
+ org.w3c.dom, \
+ org.w3c.dom.bootstrap, \
+ org.w3c.dom.css, \
+ org.w3c.dom.events, \
+ org.w3c.dom.html, \
+ org.w3c.dom.ls, \
+ org.w3c.dom.ranges, \
+ org.w3c.dom.stylesheets, \
+ org.w3c.dom.traversal, \
+ org.w3c.dom.views, \
+ org.w3c.dom.xpath, \
+ org.xml.sax, \
+ org.xml.sax.ext, \
+ org.xml.sax.helpers
+
+#
+# Equinox: Disable bundle file number limit
+#
+osgi.bundlefile.limit=0
+
+#
+# Equinox: Delay for writing the framework state to disk.
+# Must be >= 1000 and <= 1800000
+#
+eclipse.stateSaveDelayInterval = 1000
Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/deployer-config.properties
------------------------------------------------------------------------------
svn:eol-style = native
Modified: geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/deployer/DeployerCLI.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/deployer/DeployerCLI.java?rev=1096396&r1=1096395&r2=1096396&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/deployer/DeployerCLI.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/deployer/DeployerCLI.java Mon Apr 25 02:45:23 2011
@@ -17,6 +17,7 @@
package org.apache.geronimo.cli.deployer;
import java.util.Arrays;
+import java.util.Properties;
import org.apache.geronimo.cli.AbstractCLI;
import org.apache.geronimo.cli.CLParser;
@@ -57,6 +58,7 @@ public class DeployerCLI extends Abstrac
Bootstrapper boot = super.createBootstrapper(parser);
boot.setWaitForStop(false);
boot.setUniqueInstance(true);
+ boot.setConfigFile("deployer-config.properties");
boot.setStartBundles(Arrays.asList("org.apache.geronimo.framework/online-deployer//car"));
boot.setLog4jConfigFile("var/log/deployer-log4j.properties");
return boot;
Modified: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/FrameworkLauncher.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/FrameworkLauncher.java?rev=1096396&r1=1096395&r2=1096396&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/FrameworkLauncher.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/FrameworkLauncher.java Mon Apr 25 02:45:23 2011
@@ -83,6 +83,7 @@ public class FrameworkLauncher {
private boolean uniqueInstance = false;
private String log4jFile;
private String startupFile = STARTUP_PROPERTIES_FILE_NAME;
+ private String configFile = CONFIG_PROPERTIES_FILE_NAME;
private boolean cleanStorage = false;
private ServerInfo serverInfo;
@@ -91,6 +92,7 @@ public class FrameworkLauncher {
private File cacheDirectory;
private Properties configProps = null;
+
private Framework framework = null;
private int defaultStartLevel = 100;
@@ -98,6 +100,10 @@ public class FrameworkLauncher {
this.log4jFile = log4jFile;
}
+ public void setConfigFile(String configFile) {
+ this.configFile = configFile;
+ }
+
public void setStartupFile(String startupFile) {
this.startupFile = startupFile;
}
@@ -109,7 +115,7 @@ public class FrameworkLauncher {
public void setCleanStorage(boolean cleanStorage) {
this.cleanStorage = cleanStorage;
}
-
+
public void launch() throws Exception {
geronimoHome = Utils.getGeronimoHome();
geronimoBase = Utils.getGeronimoBase(geronimoHome);
@@ -122,7 +128,7 @@ public class FrameworkLauncher {
System.setProperty(PROP_KARAF_HOME, geronimoHome.getPath());
System.setProperty(PROP_KARAF_BASE, geronimoBase.getPath());
-
+
// Load system properties.
loadSystemProperties(geronimoBase);
@@ -259,15 +265,14 @@ public class FrameworkLauncher {
}
}
- private static Properties loadConfigProperties(File baseDir) throws Exception {
- File configFile = new File(new File(baseDir, "etc"), CONFIG_PROPERTIES_FILE_NAME);
- Properties configProps = Utils.loadPropertiesFile(configFile, false);
-
+ private Properties loadConfigProperties(File baseDir) throws Exception {
+ File config = new File(new File(baseDir, "etc"), configFile);
+ Properties configProps = Utils.loadPropertiesFile(config, false);
+
// Perform variable substitution for system properties.
for (Enumeration e = configProps.propertyNames(); e.hasMoreElements();) {
String name = (String) e.nextElement();
- configProps.setProperty(name,
- Utils.substVars(configProps.getProperty(name), name, null, configProps));
+ configProps.setProperty(name, Utils.substVars(configProps.getProperty(name), name, null, configProps));
}
return configProps;
@@ -287,11 +292,11 @@ public class FrameworkLauncher {
private void updateClassLoader(Properties configProps) throws Exception {
String framework = configProps.getProperty(KARAF_FRAMEWORK);
if (framework == null) {
- throw new IllegalArgumentException("Property " + KARAF_FRAMEWORK + " must be set in the etc/" + CONFIG_PROPERTIES_FILE_NAME + " configuration file");
+ throw new IllegalArgumentException("Property " + KARAF_FRAMEWORK + " must be set in the etc/" + configFile + " configuration file");
}
String bundle = configProps.getProperty(KARAF_FRAMEWORK + "." + framework);
if (bundle == null) {
- throw new IllegalArgumentException("Property " + KARAF_FRAMEWORK + "." + framework + " must be set in the etc/" + CONFIG_PROPERTIES_FILE_NAME + " configuration file");
+ throw new IllegalArgumentException("Property " + KARAF_FRAMEWORK + "." + framework + " must be set in the etc/" + configFile + " configuration file");
}
File bundleFile = new File(geronimoBase, bundle);
if (!bundleFile.exists()) {