You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2009/04/28 15:34:53 UTC

svn commit: r769394 [2/4] - in /servicemix/smx4/kernel/branches/blueprint: ./ assembly/ assembly/src/main/descriptors/ assembly/src/main/filtered-resources/etc/ demos/smx4web/ gshell/ gshell/gshell-admin/ gshell/gshell-admin/src/main/filtered-resources...

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-core/src/main/resources/org/apache/servicemix/kernel/gshell/core/servicemix-gshell.xsd
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-core/src/main/resources/org/apache/servicemix/kernel/gshell/core/servicemix-gshell.xsd?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-core/src/main/resources/org/apache/servicemix/kernel/gshell/core/servicemix-gshell.xsd (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-core/src/main/resources/org/apache/servicemix/kernel/gshell/core/servicemix-gshell.xsd Tue Apr 28 13:34:49 2009
@@ -21,29 +21,17 @@
 <!-- $Rev: 699828 $ $Date: 2008-09-28 16:35:27 +0200 (Sun, 28 Sep 2008) $ -->
 
 <xsd:schema xmlns="http://servicemix.apache.org/schema/servicemix-gshell"
-        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-        xmlns:beans="http://www.springframework.org/schema/beans"
-        targetNamespace="http://servicemix.apache.org/schema/servicemix-gshell"
-        elementFormDefault="qualified"
-        attributeFormDefault="unqualified">
-
-    <xsd:import namespace="http://www.springframework.org/schema/beans"/>
-
-    <xsd:annotation>
-        <xsd:documentation>
-            Defines the configuration elements for Apache ServiceMix Kernel commands support.
-        </xsd:documentation>
-    </xsd:annotation>
+            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+            xmlns:beans="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+            targetNamespace="http://servicemix.apache.org/schema/servicemix-gshell"
+            elementFormDefault="qualified"
+            attributeFormDefault="unqualified">
+
+    <xsd:import namespace="http://www.osgi.org/xmlns/blueprint/v1.0.0"/>
 
     <xsd:element name="command-bundle">
         <xsd:complexType>
-            <xsd:annotation>
-                <xsd:documentation>
-                    Defines a command bundle.
-                </xsd:documentation>
-            </xsd:annotation>
             <xsd:sequence>
-                <xsd:element ref="beans:description" minOccurs="0" maxOccurs="1"/>
                 <xsd:choice minOccurs="0" maxOccurs="unbounded">
 					<xsd:element ref="command"/>
 					<xsd:element ref="alias"/>
@@ -55,33 +43,14 @@
 
     <xsd:element name="command">
         <xsd:complexType>
-            <xsd:annotation>
-                <xsd:documentation>
-                    Defines a command.
-                </xsd:documentation>
-            </xsd:annotation>
             <xsd:sequence>
-                <xsd:element ref="beans:description" minOccurs="0" maxOccurs="1"/>
-                <!--
-                NOTE: Not using an xsd:choice here, as I can't seem to figure out how to get it to properly
-                      validate the min/max of the containted elements.  W/o the xsd:choice the validation
-                      works, though have to define elements in order :-(
-                -->
-                <xsd:element ref="action" minOccurs="1" maxOccurs="1"/>
-                <xsd:element ref="documenter" minOccurs="0" maxOccurs="1"/>
-                <xsd:choice minOccurs="0" maxOccurs="1">
-                    <xsd:element ref="completer"/>
-                    <xsd:element ref="completers"/>
-                </xsd:choice>
-                <xsd:element ref="message-source" minOccurs="0" maxOccurs="1"/>
+                <xsd:element name="action" type="beans:Tbean" minOccurs="1" maxOccurs="1"/>
+                <xsd:element name="documenter" type="beans:Tbean" minOccurs="0" maxOccurs="1"/>
+                <xsd:element name="completers" type="beans:Tcollection" minOccurs="0" maxOccurs="1"/>
+                <xsd:element name="message-source" type="beans:Tbean" minOccurs="0" maxOccurs="1"/>
             </xsd:sequence>
             <xsd:attribute name="name" type="xsd:string" use="required"/>
             <xsd:attribute name="type" use="optional" default="stateful">
-                <xsd:annotation>
-                    <xsd:documentation>
-                        The command type.
-                    </xsd:documentation>
-                </xsd:annotation>
                 <xsd:simpleType>
                     <xsd:restriction base="xsd:string">
                         <xsd:enumeration value="stateless"/>
@@ -94,174 +63,13 @@
 
     <xsd:element name="link">
         <xsd:complexType>
-            <xsd:annotation>
-                <xsd:documentation>
-                    Defines a link command.
-                </xsd:documentation>
-            </xsd:annotation>
-            <xsd:sequence>
-                <xsd:element ref="beans:description" minOccurs="0" maxOccurs="1"/>
-            </xsd:sequence>
             <xsd:attribute name="name" type="xsd:string" use="required"/>
             <xsd:attribute name="target" type="xsd:string" use="required"/>
         </xsd:complexType>
     </xsd:element>
 
-    <xsd:group name="commandComponentElements">
-        <xsd:annotation>
-            <xsd:documentation>
-                Defines the valid elements for command components.  This is based on beans:beanElements,
-                stripping off the bits which are not valid in the command component context.
-            </xsd:documentation>
-        </xsd:annotation>
-		<xsd:sequence>
-			<xsd:element ref="beans:description" minOccurs="0"/>
-			<xsd:choice minOccurs="0" maxOccurs="unbounded">
-				<xsd:element ref="beans:meta"/>
-				<xsd:element ref="beans:constructor-arg"/>
-				<xsd:element ref="beans:property"/>
-				<xsd:element ref="beans:qualifier"/>
-				<xsd:element ref="beans:lookup-method"/>
-				<xsd:element ref="beans:replaced-method"/>
-				<!--
-				NOTE: This seems to cause schema validation problems... not really sure why
-				<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
-				-->
-			</xsd:choice>
-		</xsd:sequence>
-	</xsd:group>
-
-    <xsd:attributeGroup name="commandComponentAttributes">
-        <xsd:annotation>
-            <xsd:documentation>
-                Defines the valid attributes for command components.  This is based on beans:beanAttributes,
-                stripping off the bits which are not valid in the command component context.
-            </xsd:documentation>
-        </xsd:annotation>
-		<xsd:attribute name="class" type="xsd:string"/>
-		<xsd:attribute name="parent" type="xsd:string"/>
-		<xsd:attribute name="autowire" default="default">
-			<xsd:simpleType>
-				<xsd:restriction base="xsd:NMTOKEN">
-					<xsd:enumeration value="default"/>
-					<xsd:enumeration value="no"/>
-					<xsd:enumeration value="byName"/>
-					<xsd:enumeration value="byType"/>
-					<xsd:enumeration value="constructor"/>
-					<xsd:enumeration value="autodetect"/>
-				</xsd:restriction>
-			</xsd:simpleType>
-		</xsd:attribute>
-		<xsd:attribute name="dependency-check" default="default">
-			<xsd:simpleType>
-				<xsd:restriction base="xsd:NMTOKEN">
-					<xsd:enumeration value="default"/>
-					<xsd:enumeration value="none"/>
-					<xsd:enumeration value="simple"/>
-					<xsd:enumeration value="objects"/>
-					<xsd:enumeration value="all"/>
-				</xsd:restriction>
-			</xsd:simpleType>
-		</xsd:attribute>
-		<xsd:attribute name="depends-on" type="xsd:string"/>
-		<xsd:attribute name="autowire-candidate" default="default" type="beans:defaultable-boolean"/>
-		<xsd:attribute name="primary" type="xsd:boolean"/>
-		<xsd:attribute name="init-method" type="xsd:string"/>
-		<xsd:attribute name="destroy-method" type="xsd:string"/>
-		<xsd:attribute name="factory-method" type="xsd:string"/>
-		<xsd:attribute name="factory-bean" type="xsd:string"/>
-		<xsd:anyAttribute namespace="##other" processContents="lax"/>
-	</xsd:attributeGroup>
-
-    <xsd:complexType name="commandComponent" abstract="true">
-        <xsd:annotation>
-            <xsd:documentation>
-                Support for command component elements, which are all basically just beans.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:group ref="commandComponentElements"/>
-        <xsd:attributeGroup ref="commandComponentAttributes"/>
-    </xsd:complexType>
-
-    <xsd:element name="action">
-        <xsd:complexType>
-            <xsd:annotation>
-                <xsd:documentation>
-                    Defines a command action.
-                </xsd:documentation>
-            </xsd:annotation>
-            <xsd:complexContent>
-                <xsd:extension base="commandComponent"/>
-            </xsd:complexContent>
-        </xsd:complexType>
-    </xsd:element>
-
-    <xsd:element name="documenter">
-        <xsd:complexType>
-            <xsd:annotation>
-                <xsd:documentation>
-                    Defines a command documenter.
-                </xsd:documentation>
-            </xsd:annotation>
-            <xsd:complexContent>
-                <xsd:extension base="commandComponent"/>
-            </xsd:complexContent>
-        </xsd:complexType>
-    </xsd:element>
-
-    <xsd:element name="completer">
-        <xsd:complexType>
-            <xsd:annotation>
-                <xsd:documentation>
-                    Defines a command completer.
-                </xsd:documentation>
-            </xsd:annotation>
-            <xsd:complexContent>
-                <xsd:extension base="commandComponent"/>
-            </xsd:complexContent>
-        </xsd:complexType>
-    </xsd:element>
-
-    <xsd:element name="completers">
-        <xsd:complexType>
-            <xsd:annotation>
-                <xsd:documentation>
-                    Defines a configurable command completer with a set of completers.
-                </xsd:documentation>
-            </xsd:annotation>
-            <xsd:sequence>
-                <xsd:choice minOccurs="1" maxOccurs="unbounded">
-                    <xsd:element ref="beans:bean"/>
-                    <xsd:element ref="beans:ref"/>
-                    <xsd:element ref="beans:null"/>
-                </xsd:choice>
-            </xsd:sequence>
-        </xsd:complexType>
-    </xsd:element>
-
-    <xsd:element name="message-source">
-        <xsd:complexType>
-            <xsd:annotation>
-                <xsd:documentation>
-                    Defines a command message source.
-                </xsd:documentation>
-            </xsd:annotation>
-            <xsd:complexContent>
-                <xsd:extension base="commandComponent"/>
-            </xsd:complexContent>
-        </xsd:complexType>
-    </xsd:element>
-
     <xsd:element name="alias">
         <xsd:complexType>
-            <xsd:annotation>
-                <xsd:documentation>
-                    Defines a command alias.
-                </xsd:documentation>
-            </xsd:annotation>
-            <xsd:sequence>
-                <xsd:element ref="beans:description" minOccurs="0" maxOccurs="1"/>
-            </xsd:sequence>
             <xsd:attribute name="name" type="xsd:string" use="required"/>
             <xsd:attribute name="alias" type="xsd:string" use="required"/>
         </xsd:complexType>

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-core/src/test/java/org/apache/servicemix/kernel/gshell/core/Test.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-core/src/test/java/org/apache/servicemix/kernel/gshell/core/Test.java?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-core/src/test/java/org/apache/servicemix/kernel/gshell/core/Test.java (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-core/src/test/java/org/apache/servicemix/kernel/gshell/core/Test.java Tue Apr 28 13:34:49 2009
@@ -30,9 +30,9 @@
         ClassPathXmlApplicationContext context = null;
         try {
             context = new ClassPathXmlApplicationContext(
-                    new String[] { "META-INF/spring/gshell.xml",
-                                   "META-INF/spring/gshell-vfs.xml",
-                                   "META-INF/spring/gshell-commands.xml",
+                    new String[] {"OSGI-INF/blueprint/gshell.xml",
+                            "OSGI-INF/blueprint/gshell-vfs.xml",
+                            "OSGI-INF/blueprint/gshell-commands.xml",
                                    "org/apache/servicemix/kernel/gshell/core/gshell-test.xml" });
             ApplicationManager appMgr = (ApplicationManager) context.getBean("applicationManager");
             assertNotNull(appMgr);
@@ -53,9 +53,9 @@
         ClassPathXmlApplicationContext context = null;
         try {
             context = new ClassPathXmlApplicationContext(
-                    new String[] { "META-INF/spring/gshell.xml",
-                                   "META-INF/spring/gshell-vfs.xml",
-                                   "META-INF/spring/gshell-commands.xml",
+                    new String[] {"OSGI-INF/blueprint/gshell.xml",
+                            "OSGI-INF/blueprint/gshell-vfs.xml",
+                            "OSGI-INF/blueprint/gshell-commands.xml",
                                    "org/apache/servicemix/kernel/gshell/core/gshell-test.xml"});
             ApplicationManager appMgr = (ApplicationManager) context.getBean("applicationManager");
             assertNotNull(appMgr);
@@ -79,8 +79,8 @@
         ClassPathXmlApplicationContext context = null;
         try {
             context = new ClassPathXmlApplicationContext(
-                    new String[] { "META-INF/spring/gshell.xml",
-                                   "META-INF/spring/gshell-vfs.xml",
+                    new String[] {"OSGI-INF/blueprint/gshell.xml",
+                            "OSGI-INF/blueprint/gshell-vfs.xml",
                                    "org/apache/servicemix/kernel/gshell/core/gshell-test-commands.xml",
                                    "org/apache/servicemix/kernel/gshell/core/gshell-test.xml"});
             ApplicationManager appMgr = (ApplicationManager) context.getBean("applicationManager");
@@ -105,8 +105,8 @@
         ClassPathXmlApplicationContext context = null;
         try {
             context = new ClassPathXmlApplicationContext(
-                    new String[] { "META-INF/spring/gshell.xml",
-                                   "META-INF/spring/gshell-vfs.xml",
+                    new String[] {"OSGI-INF/blueprint/gshell.xml",
+                            "OSGI-INF/blueprint/gshell-vfs.xml",
                                    "org/apache/servicemix/kernel/gshell/core/gshell-test-commands.xml",
                                    "org/apache/servicemix/kernel/gshell/core/gshell-test.xml"});
             ApplicationManager appMgr = (ApplicationManager) context.getBean("applicationManager");
@@ -134,8 +134,8 @@
         ClassPathXmlApplicationContext context = null;
         try {
             context = new ClassPathXmlApplicationContext(
-                    new String[] { "META-INF/spring/gshell.xml",
-                                   "META-INF/spring/gshell-vfs.xml",
+                    new String[] {"OSGI-INF/blueprint/gshell.xml",
+                            "OSGI-INF/blueprint/gshell-vfs.xml",
                                    "org/apache/servicemix/kernel/gshell/core/gshell-test-commands.xml",
                                    "org/apache/servicemix/kernel/gshell/core/gshell-test.xml"});
             ApplicationManager appMgr = (ApplicationManager) context.getBean("applicationManager");

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/pom.xml?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/pom.xml (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/pom.xml Tue Apr 28 13:34:49 2009
@@ -69,11 +69,13 @@
             <groupId>org.apache.servicemix.kernel</groupId>
             <artifactId>org.apache.servicemix.kernel.filemonitor</artifactId>
         </dependency>
-        
+
+        <!--
         <dependency>
             <groupId>org.springframework.osgi</groupId>
             <artifactId>spring-osgi-core</artifactId>
         </dependency>
+        -->
 
         <dependency>
             <groupId>org.apache.servicemix.bundles</groupId>
@@ -101,7 +103,6 @@
                             org.apache.geronimo.gshell.wisdom.command,
                             org.apache.servicemix.kernel.gshell.core,
                             org.apache.geronimo.gshell.wisdom.registry,
-                            org.springframework.beans.factory.config,
                             *
                         </Import-Package>
                         <Private-Package>!*</Private-Package>

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeatureDeploymentListener.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeatureDeploymentListener.java?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeatureDeploymentListener.java (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeatureDeploymentListener.java Tue Apr 28 13:34:49 2009
@@ -47,15 +47,11 @@
 import org.osgi.framework.BundleEvent;
 import org.osgi.framework.Constants;
 import org.osgi.framework.SynchronousBundleListener;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.osgi.context.BundleContextAware;
 
 /**
  * A deployment listener able to hot deploy a feature descriptor
  */
-public class FeatureDeploymentListener implements DeploymentListener, SynchronousBundleListener, BundleContextAware,
-                                                        InitializingBean, DisposableBean {
+public class FeatureDeploymentListener implements DeploymentListener, SynchronousBundleListener {
 
     public static final String FEATURE_PATH = "org.apache.servicemix.kernel.gshell.features";
 

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeatureImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeatureImpl.java?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeatureImpl.java (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeatureImpl.java Tue Apr 28 13:34:49 2009
@@ -22,13 +22,11 @@
 import java.util.Map;
 
 import org.apache.servicemix.kernel.gshell.features.Feature;
-import org.springframework.jmx.export.annotation.ManagedAttribute;
-import org.springframework.jmx.export.annotation.ManagedResource;
 
 /**
  * A feature
  */
-@ManagedResource(description = "Managed Feature", currencyTimeLimit = 15)
+//@ManagedResource(description = "Managed Feature", currencyTimeLimit = 15)
 public class FeatureImpl implements Feature {
 
     private String id;
@@ -50,17 +48,17 @@
         this.id = name + "-" + version;
     }
 
-    @ManagedAttribute(description = "Feature Unique ID")
+//    @ManagedAttribute(description = "Feature Unique ID")
     public String getId() {
         return id;
     }
 
-    @ManagedAttribute(description = "Feature Name")
+//    @ManagedAttribute(description = "Feature Name")
     public String getName() {
         return name;
     }
 
-    @ManagedAttribute(description = "Feature Version")
+//    @ManagedAttribute(description = "Feature Version")
     public String getVersion() {
 		return version;
 	}
@@ -69,7 +67,7 @@
 		this.version = version;
 	}
 
-    @ManagedAttribute(description = "List of Dependencies")
+//    @ManagedAttribute(description = "List of Dependencies")
     public List<Feature> getDependencies() {
         return dependencies;
     }

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeaturesServiceImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeaturesServiceImpl.java?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeaturesServiceImpl.java (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/FeaturesServiceImpl.java Tue Apr 28 13:34:49 2009
@@ -53,7 +53,6 @@
 import org.osgi.service.prefs.BackingStoreException;
 import org.osgi.service.prefs.Preferences;
 import org.osgi.service.prefs.PreferencesService;
-import org.springframework.osgi.context.BundleContextAware;
 
 /**
  * The Features service implementation.
@@ -62,7 +61,7 @@
  * installing the needed bundles.
  *
  */
-public class FeaturesServiceImpl implements FeaturesService, BundleContextAware {
+public class FeaturesServiceImpl implements FeaturesService {
 
     private static final String ALIAS_KEY = "_alias_factory_pid";
 

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/RepositoryImpl.java?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/RepositoryImpl.java (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/internal/RepositoryImpl.java Tue Apr 28 13:34:49 2009
@@ -39,15 +39,12 @@
 
 import org.apache.servicemix.kernel.gshell.features.Feature;
 import org.apache.servicemix.kernel.gshell.features.Repository;
-import org.springframework.jmx.export.annotation.ManagedAttribute;
-import org.springframework.jmx.export.annotation.ManagedOperation;
-import org.springframework.jmx.export.annotation.ManagedResource;
 import org.xml.sax.SAXException;
 
 /**
  * The repository implementation.
  */
-@ManagedResource
+//@ManagedResource
 public class RepositoryImpl implements Repository {
 
     private URI uri;
@@ -58,12 +55,12 @@
         this.uri = uri;
     }
 
-    @ManagedAttribute
+//    @ManagedAttribute
     public URI getURI() {
         return uri;
     }
 
-    @ManagedOperation
+//    @ManagedOperation
     public URI[] getRepositories() throws Exception {
         if (repositories == null) {
             load();
@@ -71,7 +68,7 @@
         return repositories.toArray(new URI[repositories.size()]);
     }
 
-    @ManagedOperation(description = "List of Features provided by this repository")
+//    @ManagedOperation(description = "List of Features provided by this repository")
     public Feature[] getFeatures() throws Exception {
         if (features == null) {
             load();

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagedFeature.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagedFeature.java?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagedFeature.java (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagedFeature.java Tue Apr 28 13:34:49 2009
@@ -20,14 +20,11 @@
 
 import org.apache.servicemix.kernel.gshell.features.Feature;
 import org.apache.servicemix.kernel.gshell.features.FeaturesService;
-import org.springframework.jmx.export.annotation.ManagedAttribute;
-import org.springframework.jmx.export.annotation.ManagedOperation;
-import org.springframework.jmx.export.annotation.ManagedResource;
 
 /**
  * Managed Repository MBean
  */
-@ManagedResource(description = "Feature")
+//@ManagedResource(description = "Feature")
 public class ManagedFeature {
     private Feature feature;
     private FeaturesService featuresService;
@@ -39,37 +36,37 @@
         this.featuresService = featuresService;
     }
 
-    @ManagedAttribute
+//    @ManagedAttribute
     public String getId() {
         return id;    
     }
 
-    @ManagedAttribute
+//    @ManagedAttribute
     public String getName() {
         return feature.getName();
     }
 
-    @ManagedAttribute
+//    @ManagedAttribute
     public String getVersion() {
         return feature.getVersion();
     }
 
-    @ManagedAttribute
+//    @ManagedAttribute
     public List<Feature> getDependencies() {
         return feature.getDependencies();
     }
 
-    @ManagedAttribute
+//    @ManagedAttribute
     public List<String> getBundles() {
         return feature.getBundles();
     }
 
-    @ManagedOperation
+//    @ManagedOperation
     public void uninstallFeature() throws Exception {
         featuresService.uninstallFeature(feature.getName(), feature.getVersion());
     }
 
-    @ManagedOperation
+//    @ManagedOperation
     public void installFeature() throws Exception {
         featuresService.installFeature(feature.getName(), feature.getVersion());
     }

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagedFeaturesRegistry.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagedFeaturesRegistry.java?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagedFeaturesRegistry.java (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagedFeaturesRegistry.java Tue Apr 28 13:34:49 2009
@@ -28,16 +28,13 @@
 import org.apache.servicemix.kernel.gshell.features.FeaturesRegistry;
 import org.apache.servicemix.kernel.gshell.features.FeaturesService;
 import org.apache.servicemix.kernel.gshell.features.Repository;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.jmx.export.annotation.ManagedOperation;
-import org.springframework.jmx.export.annotation.ManagedResource;
 
 /**
  * The FeaturesServiceRegistry maintains the managed Features and Repositories
  * for JMX management.
  */
-@ManagedResource(description = "Features Service Registry and Management")
-public class ManagedFeaturesRegistry implements InitializingBean, FeaturesRegistry {
+//@ManagedResource(description = "Features Service Registry and Management")
+public class ManagedFeaturesRegistry implements FeaturesRegistry {
 
     private static final transient Log LOG = LogFactory.getLog(ManagedFeaturesRegistry.class);
 
@@ -49,17 +46,17 @@
     private boolean mbeanServerInitialized;
     private FeaturesService featuresService;
 
-    @ManagedOperation
+//    @ManagedOperation
     public void installFeature(String name) throws Exception {
         featuresService.installFeature(name);
     }
 
-    @ManagedOperation
+//    @ManagedOperation
     public void installFeature(String name, String version) throws Exception {
         featuresService.installFeature(name, version);
     }
 
-    @ManagedOperation
+//    @ManagedOperation
     public void installRepository(String repositoryUri) throws Exception {
         featuresService.addRepository(new URI(repositoryUri));
     }

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagedRepository.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagedRepository.java?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagedRepository.java (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagedRepository.java Tue Apr 28 13:34:49 2009
@@ -21,11 +21,8 @@
 import org.apache.servicemix.kernel.gshell.features.Feature;
 import org.apache.servicemix.kernel.gshell.features.FeaturesService;
 import org.apache.servicemix.kernel.gshell.features.Repository;
-import org.springframework.jmx.export.annotation.ManagedAttribute;
-import org.springframework.jmx.export.annotation.ManagedOperation;
-import org.springframework.jmx.export.annotation.ManagedResource;
 
-@ManagedResource(description = "Features Repository")
+//@ManagedResource(description = "Features Repository")
 public class ManagedRepository {
     private Repository repository;
     private FeaturesService featuresService;
@@ -35,22 +32,22 @@
         this.featuresService = featuresService;
     }
 
-    @ManagedAttribute
+//    @ManagedAttribute
     public URI getUri() {
         return repository.getURI();
     }
 
-    @ManagedAttribute
+//    @ManagedAttribute
     public URI[] getRepositories() throws Exception {
         return repository.getRepositories();
     }
 
-    @ManagedAttribute
+//    @ManagedAttribute
     public Feature[] getFeatures() throws Exception {
         return repository.getFeatures();
     }
 
-    @ManagedOperation
+//    @ManagedOperation
     public void removeRepository() throws Exception {
         featuresService.removeRepository(repository.getURI());
     }

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagementAgent.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagementAgent.java?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagementAgent.java (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/java/org/apache/servicemix/kernel/gshell/features/management/ManagementAgent.java Tue Apr 28 13:34:49 2009
@@ -31,24 +31,21 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource;
-import org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler;
 
 /**
  * Management Agent that registers MBeans with JMX MBeanServer.
  */
-public class ManagementAgent implements DisposableBean {
+public class ManagementAgent  {
 
     private static final transient Log LOG = LogFactory.getLog(ManagementAgent.class);
 
     private MBeanServer mbeanServer;
-    private MetadataMBeanInfoAssembler assembler;
+//    private MetadataMBeanInfoAssembler assembler;
     private Set<ObjectName> mbeans = new HashSet<ObjectName>();
 
     public ManagementAgent() {
-        assembler = new MetadataMBeanInfoAssembler();
-        assembler.setAttributeSource(new AnnotationJmxAttributeSource());
+//        assembler = new MetadataMBeanInfoAssembler();
+//        assembler.setAttributeSource(new AnnotationJmxAttributeSource());
     }
 
     public MBeanServer getMbeanServer() {
@@ -85,21 +82,21 @@
     }
 
     public void register(Object obj, ObjectName name, boolean forceRegistration) throws JMException {
-        try {
-            registerMBeanWithServer(obj, name, forceRegistration);
-        } catch (NotCompliantMBeanException e) {
-            // If this is not a "normal" MBean, then try to deploy it using JMX
-            // annotations
-            ModelMBeanInfo mbi = assembler.getMBeanInfo(obj, name.toString());
-            RequiredModelMBean mbean = (RequiredModelMBean) mbeanServer.instantiate(RequiredModelMBean.class.getName());
-            mbean.setModelMBeanInfo(mbi);
-            try {
-                mbean.setManagedResource(obj, "ObjectReference");
-            } catch (InvalidTargetObjectTypeException itotex) {
-                throw new JMException(itotex.getMessage());
-            }
-            registerMBeanWithServer(mbean, name, forceRegistration);
-        }
+//        try {
+//            registerMBeanWithServer(obj, name, forceRegistration);
+//        } catch (NotCompliantMBeanException e) {
+//            // If this is not a "normal" MBean, then try to deploy it using JMX
+//            // annotations
+//            ModelMBeanInfo mbi = assembler.getMBeanInfo(obj, name.toString());
+//            RequiredModelMBean mbean = (RequiredModelMBean) mbeanServer.instantiate(RequiredModelMBean.class.getName());
+//            mbean.setModelMBeanInfo(mbi);
+//            try {
+//                mbean.setManagedResource(obj, "ObjectReference");
+//            } catch (InvalidTargetObjectTypeException itotex) {
+//                throw new JMException(itotex.getMessage());
+//            }
+//            registerMBeanWithServer(mbean, name, forceRegistration);
+//        }
     }
 
     public synchronized void unregister(ObjectName name) throws JMException {

Copied: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/resources/OSGI-INF/blueprint/gshell-features.xml (from r768025, servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/resources/META-INF/spring/gshell-features.xml)
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/resources/OSGI-INF/blueprint/gshell-features.xml?p2=servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/resources/OSGI-INF/blueprint/gshell-features.xml&p1=servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/resources/META-INF/spring/gshell-features.xml&r1=768025&r2=769394&rev=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/resources/META-INF/spring/gshell-features.xml (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/resources/OSGI-INF/blueprint/gshell-features.xml Tue Apr 28 13:34:49 2009
@@ -17,123 +17,110 @@
     limitations under the License.
 
 -->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:ctx="http://www.springframework.org/schema/context"
-       xmlns:osgi="http://www.springframework.org/schema/osgi"
-       xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
-       xmlns:util="http://www.springframework.org/schema/util"
-       xmlns:gshell="http://servicemix.apache.org/schema/servicemix-gshell"
-       xsi:schemaLocation="
-  http://www.springframework.org/schema/beans
-  http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://www.springframework.org/schema/context
-  http://www.springframework.org/schema/context/spring-context.xsd
-  http://www.springframework.org/schema/osgi
-  http://www.springframework.org/schema/osgi/spring-osgi.xsd
-  http://www.springframework.org/schema/osgi-compendium
-  http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
-  http://www.springframework.org/schema/util
-  http://www.springframework.org/schema/util/spring-util.xsd
-  http://servicemix.apache.org/schema/servicemix-gshell
-  http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd">
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:gshell="http://servicemix.apache.org/schema/servicemix-gshell"
+           xmlns:osgix="http://www.osgi.org/xmlns/blueprint-compendium/v1.0.0">
+
+    <osgix:property-placeholder persistent-id="org.apache.servicemix.features">
+        <osgix:default-properties>
+            <osgix:property name="featuresRepositories" value=""/>
+            <osgix:property name="featuresBoot" value=""/>
+        </osgix:default-properties>
+    </osgix:property-placeholder>
 
-    <import resource="classpath:org/apache/servicemix/kernel/gshell/core/commands.xml" />
-    
     <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-      <property name="location" value="file:${servicemix.home}/etc/org.apache.servicemix.features.cfg"/>
+        <property name="location" value="file:${servicemix.home}/etc/org.apache.servicemix.features.cfg"/>
     </bean>
 
     <gshell:command-bundle>
         <gshell:command name="features/addUrl">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.AddUrlCommand" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.AddUrlCommand"/>
         </gshell:command>
         <gshell:command name="features/listUrl">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.ListUrlCommand" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.ListUrlCommand"/>
         </gshell:command>
         <gshell:command name="features/removeUrl">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.RemoveUrlCommand" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.RemoveUrlCommand"/>
             <gshell:completers>
-                <ref bean="removeUrlCompleter" />
+                <ref component="removeUrlCompleter"/>
             </gshell:completers>
         </gshell:command>
         <gshell:command name="features/refreshUrl">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.RefreshUrlCommand" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.RefreshUrlCommand"/>
         </gshell:command>
         <gshell:command name="features/install">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.InstallFeatureCommand" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.InstallFeatureCommand"/>
             <gshell:completers>
-                <ref bean="installFeatureCompleter" /> 
+                <ref component="installFeatureCompleter"/>
             </gshell:completers>
         </gshell:command>
         <gshell:command name="features/uninstall">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.UninstallFeatureCommand" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.UninstallFeatureCommand"/>
             <gshell:completers>
-                <ref bean="uninstallFeatureCompleter" />
+                <ref component="uninstallFeatureCompleter"/>
             </gshell:completers>
         </gshell:command>
         <gshell:command name="features/list">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.ListFeaturesCommand" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.features.commands.ListFeaturesCommand"/>
         </gshell:command>
     </gshell:command-bundle>
 
-    <bean id="featuresService" class="org.apache.servicemix.kernel.gshell.features.internal.FeaturesServiceImpl" init-method="start" destroy-method="stop">
-        <property name="urls" value="${featuresRepositories}" />
-        <property name="boot" value="${featuresBoot}" />
-        <property name="configAdmin" ref="configAdmin" />
-        <property name="preferences" ref="preferences" />
-        <property name="featuresServiceRegistry" ref="featureServiceRegistry" />
+    <bean id="featuresService" class="org.apache.servicemix.kernel.gshell.features.internal.FeaturesServiceImpl"
+          init-method="start" destroy-method="stop">
+        <property name="bundleContext" ref="bundleContext"/>
+        <property name="urls" value="${featuresRepositories}"/>
+        <property name="boot" value="${featuresBoot}"/>
+        <property name="configAdmin" ref="configAdmin"/>
+        <property name="preferences" ref="preferences"/>
+        <property name="featuresServiceRegistry" ref="featureServiceRegistry"/>
     </bean>
 
-    <bean id="featureDeploymentListener" class="org.apache.servicemix.kernel.gshell.features.internal.FeatureDeploymentListener">
-        <property name="featuresService" ref="featuresService" />
+    <bean id="featureDeploymentListener" class="org.apache.servicemix.kernel.gshell.features.internal.FeatureDeploymentListener" init-method="afterPropertiesSet" destroy-method="destroy">
+        <property name="bundleContext" ref="bundleContext"/>
+        <property name="featuresService" ref="featuresService"/>
     </bean>
 
     <bean id="namingStrategy" class="org.apache.servicemix.kernel.gshell.features.management.DefaultNamingStrategy">
-        <property name="jmxDomainName" value="org.apache.servicemix" />
+        <property name="jmxDomainName" value="org.apache.servicemix"/>
     </bean>
 
     <bean id="managementAgent" class="org.apache.servicemix.kernel.gshell.features.management.ManagementAgent">
-        <property name="mbeanServer" ref="mbeanServer" />
+        <property name="mbeanServer" ref="mbeanServer"/>
     </bean>
 
-    <bean id="featureServiceRegistry" class="org.apache.servicemix.kernel.gshell.features.management.ManagedFeaturesRegistry">
-        <property name="managementAgent" ref="managementAgent" />
-        <property name="namingStrategy" ref="namingStrategy" />
-        <property name="featuresService" ref="featuresService" />
+    <bean id="featureServiceRegistry"
+          class="org.apache.servicemix.kernel.gshell.features.management.ManagedFeaturesRegistry"
+          init-method="afterPropertiesSet">
+        <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" />
+    <reference id="configAdmin" interface="org.osgi.service.cm.ConfigurationAdmin"/>
 
-    <osgi:reference id="preferences" interface="org.osgi.service.prefs.PreferencesService" cardinality="0..1" />
+    <reference id="preferences" interface="org.osgi.service.prefs.PreferencesService" availability="optional"/>
 
-    <osgi:service ref="featuresService" interface="org.apache.servicemix.kernel.gshell.features.FeaturesService" />
+    <service ref="featuresService" interface="org.apache.servicemix.kernel.gshell.features.FeaturesService"/>
 
-    <osgi:service ref="featureDeploymentListener" interface="org.apache.servicemix.kernel.filemonitor.DeploymentListener" />
+    <service ref="featureDeploymentListener" interface="org.apache.servicemix.kernel.filemonitor.DeploymentListener"/>
 
-    <osgix:cm-properties id="cmProps" persistent-id="org.apache.servicemix.features">
-        <prop key="featuresRepositories"></prop>
-        <prop key="featuresBoot"></prop>
-    </osgix:cm-properties>
+    <reference id="mbeanServer" interface="javax.management.MBeanServer" availability="optional">
+        <listener ref="featureServiceRegistry" bind-method="registerMBeanServer" unbind-method=""/>
+    </reference>
 
-    <!-- <ctx:property-placeholder properties-ref="cmProps" /> -->
-
-    <osgi:reference id="mbeanServer"
-                    interface="javax.management.MBeanServer"
-                    cardinality="0..1" >
-        <osgi:listener ref="featureServiceRegistry" bind-method="registerMBeanServer" />
-    </osgi:reference>
-
-    <bean id="installFeatureCompleter" class="org.apache.servicemix.kernel.gshell.features.completers.AvailableFeatureCompleter">
-        <property name="featuresRegistry" ref="featureServiceRegistry" />
+    <bean id="installFeatureCompleter"
+          class="org.apache.servicemix.kernel.gshell.features.completers.AvailableFeatureCompleter">
+        <property name="featuresRegistry" ref="featureServiceRegistry"/>
     </bean>
 
-    <bean id="uninstallFeatureCompleter" class="org.apache.servicemix.kernel.gshell.features.completers.InstalledFeatureCompleter">
-        <property name="featuresRegistry" ref="featureServiceRegistry" />
+    <bean id="uninstallFeatureCompleter"
+          class="org.apache.servicemix.kernel.gshell.features.completers.InstalledFeatureCompleter">
+        <property name="featuresRegistry" ref="featureServiceRegistry"/>
     </bean>
 
-    <bean id="removeUrlCompleter" class="org.apache.servicemix.kernel.gshell.features.completers.FeatureRepositoryCompleter">
-        <property name="featuresRegistry" ref="featureServiceRegistry" />
+    <bean id="removeUrlCompleter"
+          class="org.apache.servicemix.kernel.gshell.features.completers.FeatureRepositoryCompleter">
+        <property name="featuresRegistry" ref="featureServiceRegistry"/>
     </bean>
 
-</beans>
\ No newline at end of file
+</blueprint>
\ No newline at end of file

Propchange: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-features/src/main/resources/OSGI-INF/blueprint/gshell-features.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-log/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-log/pom.xml?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-log/pom.xml (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-log/pom.xml Tue Apr 28 13:34:49 2009
@@ -55,10 +55,12 @@
             <scope>provided</scope>
         </dependency>
 
+        <!--
         <dependency>
             <groupId>org.springframework.osgi</groupId>
             <artifactId>spring-osgi-core</artifactId>
         </dependency>
+        -->
 
         <dependency>
             <groupId>org.ops4j.pax.logging</groupId>

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-obr/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-obr/pom.xml?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-obr/pom.xml (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-obr/pom.xml Tue Apr 28 13:34:49 2009
@@ -54,10 +54,12 @@
             <artifactId>org.apache.servicemix.kernel.gshell.core</artifactId>
         </dependency>
 
+        <!--
         <dependency>
             <groupId>org.springframework.osgi</groupId>
             <artifactId>spring-osgi-core</artifactId>
         </dependency>
+        -->
     </dependencies>
 
     <build>

Copied: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-obr/src/main/resources/OSGI-INF/blueprint/gshell-obr.xml (from r768025, servicemix/smx4/kernel/branches/blueprint/gshell/gshell-obr/src/main/resources/META-INF/spring/gshell-obr.xml)
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-obr/src/main/resources/OSGI-INF/blueprint/gshell-obr.xml?p2=servicemix/smx4/kernel/branches/blueprint/gshell/gshell-obr/src/main/resources/OSGI-INF/blueprint/gshell-obr.xml&p1=servicemix/smx4/kernel/branches/blueprint/gshell/gshell-obr/src/main/resources/META-INF/spring/gshell-obr.xml&r1=768025&r2=769394&rev=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-obr/src/main/resources/META-INF/spring/gshell-obr.xml (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-obr/src/main/resources/OSGI-INF/blueprint/gshell-obr.xml Tue Apr 28 13:34:49 2009
@@ -17,25 +17,8 @@
     limitations under the License.
 
 -->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:osgi="http://www.springframework.org/schema/osgi"
-       xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
-       xmlns:util="http://www.springframework.org/schema/util"
-       xmlns:gshell="http://servicemix.apache.org/schema/servicemix-gshell"
-       xsi:schemaLocation="
-  http://www.springframework.org/schema/beans
-  http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://www.springframework.org/schema/osgi
-  http://www.springframework.org/schema/osgi/spring-osgi.xsd
-  http://www.springframework.org/schema/osgi-compendium
-  http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
-  http://www.springframework.org/schema/util
-  http://www.springframework.org/schema/util/spring-util.xsd
-  http://servicemix.apache.org/schema/servicemix-gshell
-  http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd">
-
-    <import resource="classpath:org/apache/servicemix/kernel/gshell/core/commands.xml" />
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:gshell="http://servicemix.apache.org/schema/servicemix-gshell">
 
     <gshell:command-bundle>
         <gshell:command name="obr/addUrl">
@@ -67,4 +50,4 @@
         </gshell:command>
     </gshell:command-bundle>
 
-</beans>
\ No newline at end of file
+</blueprint>
\ No newline at end of file

Propchange: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-obr/src/main/resources/OSGI-INF/blueprint/gshell-obr.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/pom.xml?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/pom.xml (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/pom.xml Tue Apr 28 13:34:49 2009
@@ -49,6 +49,7 @@
             <scope>provided</scope>
         </dependency>
 
+        <!--
         <dependency>
             <groupId>org.springframework.osgi</groupId>
             <artifactId>spring-osgi-core</artifactId>
@@ -58,6 +59,7 @@
             <groupId>org.springframework.osgi</groupId>
             <artifactId>spring-osgi-extender</artifactId>
         </dependency>
+        -->
     </dependencies>
 
     <build>

Copied: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/GShellBlueprintContextListener.java (from r768025, servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/SpringApplicationListener.java)
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/GShellBlueprintContextListener.java?p2=servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/GShellBlueprintContextListener.java&p1=servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/SpringApplicationListener.java&r1=768025&r2=769394&rev=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/SpringApplicationListener.java (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/GShellBlueprintContextListener.java Tue Apr 28 13:34:49 2009
@@ -25,61 +25,47 @@
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;
 import org.osgi.framework.BundleListener;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.osgi.context.BundleContextAware;
-import org.springframework.osgi.context.event.OsgiBundleApplicationContextEvent;
-import org.springframework.osgi.context.event.OsgiBundleApplicationContextListener;
-import org.springframework.osgi.context.event.OsgiBundleContextFailedEvent;
-import org.springframework.osgi.context.event.OsgiBundleContextRefreshedEvent;
-import org.springframework.osgi.extender.event.BootstrappingDependencyEvent;
-import org.springframework.osgi.service.importer.event.OsgiServiceDependencyEvent;
-import org.springframework.osgi.service.importer.event.OsgiServiceDependencyWaitStartingEvent;
-
-public class SpringApplicationListener implements OsgiBundleApplicationContextListener,
-                                                  BundleListener, BundleContextAware,
-                                                  InitializingBean, DisposableBean {
+import org.osgi.service.blueprint.context.BlueprintContextListener;
 
-    public static enum SpringState {
+/**
+ *
+ * TODO: use event admin to receive WAIT topics notifications from blueprint extender
+ *
+ */
+public class GShellBlueprintContextListener implements BlueprintContextListener, BundleListener {
+
+    public static enum BlueprintState {
         Unknown,
         Waiting,
         Started,
         Failed,
     }
 
-    private static final Log LOG = LogFactory.getLog(SpringApplicationListener.class);
+    private static final Log LOG = LogFactory.getLog(GShellBlueprintContextListener.class);
 
-    private final Map<Long, SpringState> states;
+    private final Map<Long, BlueprintState> states;
     private BundleContext bundleContext;
 
-    public SpringApplicationListener() {
-        this.states = new ConcurrentHashMap<Long, SpringState>();
+    public GShellBlueprintContextListener() {
+        this.states = new ConcurrentHashMap<Long, BlueprintState>();
     }
 
-    public SpringState getSpringState(Bundle bundle) {
-        SpringState state = states.get(bundle.getBundleId());
+    public BlueprintState getBlueprintState(Bundle bundle) {
+        BlueprintState state = states.get(bundle.getBundleId());
         if (state == null || bundle.getState() != Bundle.ACTIVE) {
-            state = SpringState.Unknown;
+            state = BlueprintState.Unknown;
         }
         return state;
     }
 
-    public void onOsgiApplicationEvent(OsgiBundleApplicationContextEvent event) {
-        SpringState state = null;
-        if (event instanceof BootstrappingDependencyEvent) {
-            OsgiServiceDependencyEvent de = ((BootstrappingDependencyEvent) event).getDependencyEvent();
-            if (de instanceof OsgiServiceDependencyWaitStartingEvent) {
-                state = SpringState.Waiting;
-            }
-        } else if (event instanceof OsgiBundleContextFailedEvent) {
-            state = SpringState.Failed;
-        } else if (event instanceof OsgiBundleContextRefreshedEvent) {
-            state = SpringState.Started;
-        }
-        if (state != null) {
-            LOG.debug("Spring app state changed to " + state + " for bundle " + event.getBundle().getBundleId());
-            states.put(event.getBundle().getBundleId(), state);
-        }
+    public void contextCreated(Bundle bundle) {
+        LOG.debug("Blueprint app state changed to " + BlueprintState.Started + " for bundle " + bundle.getBundleId());
+        states.put(bundle.getBundleId(), BlueprintState.Started);
+    }
+
+    public void contextCreationFailed(Bundle bundle, Throwable rootCause) {
+        LOG.debug("Blueprint app state changed to " + BlueprintState.Failed + " for bundle " + bundle.getBundleId());
+        states.put(bundle.getBundleId(), BlueprintState.Failed);
     }
 
     public void bundleChanged(BundleEvent event) {

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/ListBundles.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/ListBundles.java?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/ListBundles.java (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/ListBundles.java Tue Apr 28 13:34:49 2009
@@ -35,14 +35,14 @@
     @Option(name = "-u", description = "Show update")
     boolean showUpdate;
 
-    private SpringApplicationListener springApplicationListener;
+    private GShellBlueprintContextListener blueprintApplicationListener;
 
-    public SpringApplicationListener getSpringApplicationListener() {
-        return springApplicationListener;
+    public GShellBlueprintContextListener getBlueprintApplicationListener() {
+        return blueprintApplicationListener;
     }
 
-    public void setSpringApplicationListener(SpringApplicationListener springApplicationListener) {
-        this.springApplicationListener = springApplicationListener;
+    public void setBlueprintApplicationListener(GShellBlueprintContextListener blueprintApplicationListener) {
+        this.blueprintApplicationListener = blueprintApplicationListener;
     }
 
     protected Object doExecute() throws Exception {
@@ -189,12 +189,12 @@
     }
 
     public String getSpringStateString(Bundle bundle) {
-        SpringApplicationListener.SpringState state = springApplicationListener.getSpringState(bundle);
-        if (state == SpringApplicationListener.SpringState.Waiting) {
+        GShellBlueprintContextListener.BlueprintState state = blueprintApplicationListener.getBlueprintState(bundle);
+        if (state == GShellBlueprintContextListener.BlueprintState.Waiting) {
             return "Waiting";
-        } else if (state == SpringApplicationListener.SpringState.Started) {
+        } else if (state == GShellBlueprintContextListener.BlueprintState.Started) {
             return "Started";
-        } else if (state == SpringApplicationListener.SpringState.Failed) {
+        } else if (state == GShellBlueprintContextListener.BlueprintState.Failed) {
             return "Failed ";
         } else {
             return "       ";

Copied: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/resources/OSGI-INF/blueprint/gshell-osgi.xml (from r768025, servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/resources/META-INF/spring/gshell-osgi.xml)
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/resources/OSGI-INF/blueprint/gshell-osgi.xml?p2=servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/resources/OSGI-INF/blueprint/gshell-osgi.xml&p1=servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/resources/META-INF/spring/gshell-osgi.xml&r1=768025&r2=769394&rev=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/resources/META-INF/spring/gshell-osgi.xml (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/resources/OSGI-INF/blueprint/gshell-osgi.xml Tue Apr 28 13:34:49 2009
@@ -17,72 +17,85 @@
     limitations under the License.
 
 -->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:osgi="http://www.springframework.org/schema/osgi"
-       xmlns:util="http://www.springframework.org/schema/util"
-       xmlns:gshell="http://servicemix.apache.org/schema/servicemix-gshell"
-       xsi:schemaLocation="
-  http://www.springframework.org/schema/beans
-  http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://www.springframework.org/schema/util
-  http://www.springframework.org/schema/util/spring-util.xsd
-  http://www.springframework.org/schema/osgi
-  http://www.springframework.org/schema/osgi/spring-osgi.xsd
-  http://servicemix.apache.org/schema/servicemix-gshell
-  http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd">
-
-    <import resource="classpath:org/apache/servicemix/kernel/gshell/core/commands.xml" />
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:gshell="http://servicemix.apache.org/schema/servicemix-gshell">
 
     <gshell:command-bundle>
         <gshell:command name="osgi/bundle-level">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.BundleLevel" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.BundleLevel">
+                <property name="bundleContext" ref="bundleContext"/>
+            </gshell:action>
         </gshell:command>
         <gshell:command name="osgi/headers">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.Headers" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.Headers">
+                <property name="bundleContext" ref="bundleContext"/>
+            </gshell:action>
         </gshell:command>
         <gshell:command name="osgi/install">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.InstallBundle" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.InstallBundle">
+                <property name="bundleContext" ref="bundleContext"/>
+            </gshell:action>
         </gshell:command>
         <gshell:command name="osgi/list">
             <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.ListBundles">
-                <property name="springApplicationListener" ref="springApplicationListener" />
+                <property name="bundleContext" ref="bundleContext"/>
+                <property name="blueprintApplicationListener" ref="blueprintApplicationListener"/>
             </gshell:action>
         </gshell:command>
         <gshell:command name="osgi/ls">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.ListServices" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.ListServices">
+                <property name="bundleContext" ref="bundleContext"/>
+            </gshell:action>
         </gshell:command>
         <gshell:command name="osgi/refresh">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.RefreshBundle" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.RefreshBundle">
+                <property name="bundleContext" ref="bundleContext"/>
+            </gshell:action>
         </gshell:command>
         <gshell:command name="osgi/update">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.UpdateBundle" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.UpdateBundle">
+                <property name="bundleContext" ref="bundleContext"/>
+            </gshell:action>
         </gshell:command>
         <gshell:command name="osgi/resolve">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.ResolveBundle" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.ResolveBundle">
+                <property name="bundleContext" ref="bundleContext"/>
+            </gshell:action>
         </gshell:command>
         <gshell:command name="osgi/restart">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.RestartBundle" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.RestartBundle">
+                <property name="bundleContext" ref="bundleContext"/>
+            </gshell:action>
         </gshell:command>
         <gshell:command name="osgi/shutdown">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.Shutdown" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.Shutdown">
+                <property name="bundleContext" ref="bundleContext"/>
+            </gshell:action>
         </gshell:command>
         <gshell:command name="osgi/start">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.StartBundle" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.StartBundle">
+                <property name="bundleContext" ref="bundleContext"/>
+            </gshell:action>
         </gshell:command>
         <gshell:command name="osgi/start-level">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.StartLevel" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.StartLevel">
+                <property name="bundleContext" ref="bundleContext"/>
+            </gshell:action>
         </gshell:command>
         <gshell:command name="osgi/stop">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.StopBundle" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.StopBundle">
+                <property name="bundleContext" ref="bundleContext"/>
+            </gshell:action>
         </gshell:command>
         <gshell:command name="osgi/uninstall">
-            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.UninstallBundle" />
+            <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.UninstallBundle">
+                <property name="bundleContext" ref="bundleContext"/>
+            </gshell:action>
         </gshell:command>
     </gshell:command-bundle>
 
-    <bean id="springApplicationListener" class="org.apache.servicemix.kernel.gshell.osgi.SpringApplicationListener" />
+    <bean id="blueprintApplicationListener" class="org.apache.servicemix.kernel.gshell.osgi.GShellBlueprintContextListener" />
 
-    <osgi:service ref="springApplicationListener" interface="org.springframework.osgi.context.event.OsgiBundleApplicationContextListener" />
+    <service ref="blueprintApplicationListener" interface="org.osgi.service.blueprint.context.BlueprintContextListener" />
 
-</beans>
\ No newline at end of file
+</blueprint>
\ No newline at end of file

Propchange: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-osgi/src/main/resources/OSGI-INF/blueprint/gshell-osgi.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-packages/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-packages/pom.xml?rev=769394&r1=769393&r2=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-packages/pom.xml (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-packages/pom.xml Tue Apr 28 13:34:49 2009
@@ -55,10 +55,12 @@
             <scope>provided</scope>
         </dependency>
 
+        <!--
         <dependency>
             <groupId>org.springframework.osgi</groupId>
             <artifactId>spring-osgi-core</artifactId>
         </dependency>
+        -->
     </dependencies>
 
     <build>

Copied: servicemix/smx4/kernel/branches/blueprint/gshell/gshell-packages/src/main/resources/OSGI-INF/blueprint/gshell-packages.xml (from r768025, servicemix/smx4/kernel/branches/blueprint/gshell/gshell-packages/src/main/resources/META-INF/spring/gshell-packages.xml)
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/branches/blueprint/gshell/gshell-packages/src/main/resources/OSGI-INF/blueprint/gshell-packages.xml?p2=servicemix/smx4/kernel/branches/blueprint/gshell/gshell-packages/src/main/resources/OSGI-INF/blueprint/gshell-packages.xml&p1=servicemix/smx4/kernel/branches/blueprint/gshell/gshell-packages/src/main/resources/META-INF/spring/gshell-packages.xml&r1=768025&r2=769394&rev=769394&view=diff
==============================================================================
--- servicemix/smx4/kernel/branches/blueprint/gshell/gshell-packages/src/main/resources/META-INF/spring/gshell-packages.xml (original)
+++ servicemix/smx4/kernel/branches/blueprint/gshell/gshell-packages/src/main/resources/OSGI-INF/blueprint/gshell-packages.xml Tue Apr 28 13:34:49 2009
@@ -17,30 +17,17 @@
     limitations under the License.
 
 -->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:osgi="http://www.springframework.org/schema/osgi"
-       xmlns:util="http://www.springframework.org/schema/util"
-       xmlns:gshell="http://servicemix.apache.org/schema/servicemix-gshell"
-       xsi:schemaLocation="
-  http://www.springframework.org/schema/beans
-  http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://www.springframework.org/schema/util
-  http://www.springframework.org/schema/util/spring-util.xsd
-  http://www.springframework.org/schema/osgi
-  http://www.springframework.org/schema/osgi/spring-osgi.xsd
-  http://servicemix.apache.org/schema/servicemix-gshell
-  http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd">
-
-    <import resource="classpath:org/apache/servicemix/kernel/gshell/core/commands.xml" />
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:gshell="http://servicemix.apache.org/schema/servicemix-gshell">
 
     <gshell:command-bundle>
         <gshell:command name="packages/exports">
             <gshell:action class="org.apache.servicemix.kernel.gshell.packages.ExportsCommand" />
         </gshell:command>
+
         <gshell:command name="packages/imports">
             <gshell:action class="org.apache.servicemix.kernel.gshell.packages.ImportsCommand" />
         </gshell:command>
     </gshell:command-bundle>
 
-</beans>
+</blueprint>