felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r771938 - in /felix/trunk/karaf: gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/ gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/internal/ gshell/gshell-features/src/main/java/org/apa...
Date Tue, 05 May 2009 17:12:17 GMT
Author: gnodet
Date: Tue May  5 17:12:16 2009
New Revision: 771938

URL: http://svn.apache.org/viewvc?rev=771938&view=rev
Log:
Fix a few problems with command bundles not starting correctly

Modified:
    felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/FeaturesRegistry.java
    felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/internal/FeaturesServiceImpl.java
    felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/management/ManagedFeaturesRegistry.java
    felix/trunk/karaf/gshell/gshell-features/src/main/resources/META-INF/spring/gshell-features.xml
    felix/trunk/karaf/jaas/jaas-modules/src/main/resources/META-INF/spring/karaf-jaas-module.xml

Modified: felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/FeaturesRegistry.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/FeaturesRegistry.java?rev=771938&r1=771937&r2=771938&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/FeaturesRegistry.java
(original)
+++ felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/FeaturesRegistry.java
Tue May  5 17:12:16 2009
@@ -21,6 +21,9 @@
  * Tracks features and repositories.
  */
 public interface FeaturesRegistry {
+
+    void setFeaturesService(FeaturesService service);
+
     void register(Feature feature);
 
     void unregister(Feature feature);

Modified: felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/internal/FeaturesServiceImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/internal/FeaturesServiceImpl.java?rev=771938&r1=771937&r2=771938&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/internal/FeaturesServiceImpl.java
(original)
+++ felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/internal/FeaturesServiceImpl.java
Tue May  5 17:12:16 2009
@@ -105,6 +105,7 @@
 
     public void setFeaturesServiceRegistry(FeaturesRegistry featuresRegistry) {
         this.featuresRegistry = featuresRegistry;
+        this.featuresRegistry.setFeaturesService(this);
     }
 
     public void setUrls(String uris) throws URISyntaxException {

Modified: felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/management/ManagedFeaturesRegistry.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/management/ManagedFeaturesRegistry.java?rev=771938&r1=771937&r2=771938&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/management/ManagedFeaturesRegistry.java
(original)
+++ felix/trunk/karaf/gshell/gshell-features/src/main/java/org/apache/felix/karaf/gshell/features/management/ManagedFeaturesRegistry.java
Tue May  5 17:12:16 2009
@@ -48,6 +48,7 @@
     private Map<String, ManagedRepository> repositories;
     private boolean mbeanServerInitialized;
     private FeaturesService featuresService;
+    private MBeanServer mbeanServer;
 
     @ManagedOperation
     public void installFeature(String name) throws Exception {
@@ -182,12 +183,19 @@
         if (namingStrategy == null) {
             throw new IllegalArgumentException("namingStrategy must not be null");
         }
+        if (mbeanServer != null) {
+            registerMBeanServer(mbeanServer, null);
+        }
     }
 
     public void registerMBeanServer(MBeanServer mbeanServer, Map props ) throws Exception
{
         if (mbeanServer != null) {
-            mbeanServerInitialized = true;
+            this.mbeanServer = mbeanServer;
+        }
+        if (managementAgent == null) {
+            return;
         }
+        mbeanServerInitialized = true;
 
         managementAgent.register(this, namingStrategy.getObjectName(this));
 

Modified: felix/trunk/karaf/gshell/gshell-features/src/main/resources/META-INF/spring/gshell-features.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-features/src/main/resources/META-INF/spring/gshell-features.xml?rev=771938&r1=771937&r2=771938&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-features/src/main/resources/META-INF/spring/gshell-features.xml
(original)
+++ felix/trunk/karaf/gshell/gshell-features/src/main/resources/META-INF/spring/gshell-features.xml
Tue May  5 17:12:16 2009
@@ -39,7 +39,7 @@
   http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd">
 
     <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-      <property name="location" value="file:${karaf.home}/etc/org.apache.servicemix.features.cfg"/>
+      <property name="location" value="file:${karaf.home}/etc/org.apache.felix.karaf.features.cfg"/>
     </bean>
 
     <gshell:command-bundle>
@@ -108,7 +108,6 @@
     <bean id="featureServiceRegistry" class="org.apache.felix.karaf.gshell.features.management.ManagedFeaturesRegistry"
init-method="init">
         <property name="managementAgent" ref="managementAgent" />
         <property name="namingStrategy" ref="namingStrategy" />
-        <property name="featuresService" ref="featuresService" />
     </bean>
 
     <osgi:reference id="configAdmin" interface="org.osgi.service.cm.ConfigurationAdmin"
/>

Modified: felix/trunk/karaf/jaas/jaas-modules/src/main/resources/META-INF/spring/karaf-jaas-module.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/jaas/jaas-modules/src/main/resources/META-INF/spring/karaf-jaas-module.xml?rev=771938&r1=771937&r2=771938&view=diff
==============================================================================
--- felix/trunk/karaf/jaas/jaas-modules/src/main/resources/META-INF/spring/karaf-jaas-module.xml
(original)
+++ felix/trunk/karaf/jaas/jaas-modules/src/main/resources/META-INF/spring/karaf-jaas-module.xml
Tue May  5 17:12:16 2009
@@ -53,7 +53,7 @@
 
     <jaas:config id="karaf">
         <jaas:module className="org.apache.felix.karaf.jaas.modules.properties.PropertiesLoginModule"
flags="required">
-            users = ${servicemix.base}/etc/users.properties
+            users = ${karaf.base}/etc/users.properties
         </jaas:module>
     </jaas:config>
 



Mime
View raw message