You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ch...@apache.org on 2008/05/01 17:42:48 UTC

svn commit: r652560 - in /servicemix/smx4/kernel/trunk/gshell: ./ gshell-activemq/ gshell-activemq/src/ gshell-activemq/src/main/ gshell-activemq/src/main/java/ gshell-activemq/src/main/java/org/ gshell-activemq/src/main/java/org/apache/ gshell-activem...

Author: chirino
Date: Thu May  1 08:42:48 2008
New Revision: 652560

URL: http://svn.apache.org/viewvc?rev=652560&view=rev
Log:
Adding some gshell commands for ActiveMQ

Added:
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/pom.xml   (with props)
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/CreateBrokerCommand.java   (with props)
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/DestroyBrokerCommand.java   (with props)
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/META-INF/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/META-INF/spring/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml   (with props)
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/apache/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/apache/servicemix/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/apache/servicemix/kernel/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/apache/servicemix/kernel/gshell/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/apache/servicemix/kernel/gshell/activemq/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/apache/servicemix/kernel/gshell/activemq/broker.xml   (with props)
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/test/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/test/java/
    servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/test/resources/
Modified:
    servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/BundleLevel.java
    servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/ListBundles.java
    servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/StartLevel.java
    servicemix/smx4/kernel/trunk/gshell/pom.xml

Added: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-activemq/pom.xml?rev=652560&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-activemq/pom.xml (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-activemq/pom.xml Thu May  1 08:42:48 2008
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <!--
+
+        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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.servicemix.kernel.gshell</groupId>
+        <artifactId>gshell</artifactId>
+        <version>1.0-m3-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.kernel.gshell</groupId>
+    <artifactId>org.apache.servicemix.kernel.gshell.activemq</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.0-m3-SNAPSHOT</version>
+    <name>Apache ServiceMix Kernel :: GShell ActiveMQ Commands</name>
+
+    <description>
+        Provides the ActiveMQ commands
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.servicemix.kernel.gshell</groupId>
+            <artifactId>org.apache.servicemix.kernel.gshell.core</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>${felix.osgi.version}</version>
+            <scope>provided</scope>
+        </dependency>
+		
+        <dependency>
+            <groupId>org.springframework.osgi</groupId>
+            <artifactId>spring-osgi-core</artifactId>
+            <version>${spring.osgi.version}</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>activemq-core</artifactId>
+            <version>5.2-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>activemq-optional</artifactId>
+            <version>5.2-SNAPSHOT</version>
+        </dependency>
+        
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
+                        <Export-Package>org.apache.servicemix.kernel.gshell.activemq*;version=${project.version};-split-package:=merge-first</Export-Package>
+                        <Import-Package>*</Import-Package>
+                        <Private-Package>!*</Private-Package>
+                        <Spring-Context>*;publish-context:=false;create-asynchronously:=false</Spring-Context>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/CreateBrokerCommand.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/CreateBrokerCommand.java?rev=652560&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/CreateBrokerCommand.java (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/CreateBrokerCommand.java Thu May  1 08:42:48 2008
@@ -0,0 +1,147 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.kernel.gshell.activemq;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Scanner;
+
+import org.apache.geronimo.gshell.clp.Option;
+import org.apache.geronimo.gshell.command.annotation.CommandComponent;
+import org.apache.geronimo.gshell.support.OsgiCommandSupport;
+
+/**
+ *
+ * @version $Rev$ $Date$
+ */
+@CommandComponent(id="activemq:create-broker", description="Creates a broker instance.")
+public class CreateBrokerCommand
+    extends OsgiCommandSupport
+{
+	
+    @Option(name="-n", aliases={"--name"}, description="The name of the broker (defaults to localhost).")
+    private String name="localhost";
+ 
+    protected Object doExecute() throws Exception {
+    	
+    	try {
+    		String name = getName();    		
+    		File base = new File(System.getProperty("servicemix.base"));
+    		File deploy = new File(base, "deploy");
+    		
+			HashMap<String, String> props = new HashMap<String, String>();
+			props.put("${name}", name);
+			
+			mkdir(deploy);
+			File configFile = new File(deploy,name+"-broker.xml");
+			copyFilteredResourceTo(configFile, "broker.xml", props);
+
+			
+			io.out.println("");
+			io.out.println("Default ActiveMQ Broker ("+name+") configuration file created at: "+configFile.getPath());
+			io.out.println("Please review the configuration and modify to suite your needs.  ");
+			io.out.println("");
+			
+		} catch (Exception e) {
+			e.printStackTrace();
+			throw e;
+		}
+
+        return 0;
+    }
+	
+	private void copyFilteredResourceTo(File outFile, String resource, HashMap<String, String> props) throws Exception {
+		if( !outFile.exists() ) {
+	        io.out.println("Creating file: @|green "+outFile.getPath()+"|");
+			InputStream is = CreateBrokerCommand.class.getResourceAsStream(resource);
+			try {
+				// Read it line at a time so that we can use the platform line ending when we write it out.
+				PrintStream out = new PrintStream(new FileOutputStream(outFile));
+				try { 
+					Scanner scanner = new Scanner(is);
+					while (scanner.hasNextLine() ) {
+						String line = scanner.nextLine();
+						line = filter(line, props);
+						out.println(line);
+					}
+				} finally {
+					safeClose(out);
+				}
+			} finally {
+				safeClose(is);
+			}
+		} else {
+	        io.out.println("@|red File allready exists|. Move it out of the way if you want it re-created: "+outFile.getPath()+"");
+		}
+	}
+
+	private void safeClose(InputStream is) throws IOException {
+		if( is==null)
+			return;
+		try {
+			is.close();
+		} catch (Throwable ignore) {
+		}
+	}
+	
+	private void safeClose(OutputStream is) throws IOException {
+		if( is==null)
+			return;
+		try {
+			is.close();
+		} catch (Throwable ignore) {
+		}
+	}
+
+	private String filter(String line, HashMap<String, String> props) {
+		for (Map.Entry<String, String> i : props.entrySet()) {
+			int p1 = line.indexOf(i.getKey());
+			if( p1 >= 0 ) {
+				String l1 = line.substring(0, p1);
+				String l2 = line.substring(p1+i.getKey().length());
+				line = l1+i.getValue()+l2;
+			}
+		}
+		return line;
+	}
+
+	private void mkdir(File file) {
+		if( !file.exists() ) {
+	        io.out.println("Creating missing directory: @|green "+file.getPath()+"|");
+			file.mkdirs();
+		}
+	}
+
+	public String getName() {
+		if( name ==  null ) {
+    		File base = new File(System.getProperty("servicemix.base"));
+    		name = base.getName();
+		}
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+}

Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/CreateBrokerCommand.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/CreateBrokerCommand.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/DestroyBrokerCommand.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/DestroyBrokerCommand.java?rev=652560&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/DestroyBrokerCommand.java (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/DestroyBrokerCommand.java Thu May  1 08:42:48 2008
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.kernel.gshell.activemq;
+
+import java.io.File;
+
+import org.apache.geronimo.gshell.clp.Option;
+import org.apache.geronimo.gshell.command.annotation.CommandComponent;
+import org.apache.geronimo.gshell.support.OsgiCommandSupport;
+
+/**
+ * 
+ *
+ * @version $Rev$ $Date$
+ */
+@CommandComponent(id="activemq:destroy-broker", description="Destroys a broker instance.")
+public class DestroyBrokerCommand
+    extends OsgiCommandSupport
+{
+	
+    @Option(name="-n", aliases={"--name"}, description="The name of the broker (defaults to localhost).")
+    private String name="localhost";
+ 
+    protected Object doExecute() throws Exception {
+    	
+    	try {
+    		String name = getName();    		
+    		File base = new File(System.getProperty("servicemix.base"));
+    		File deploy = new File(base, "deploy");
+			File configFile = new File(deploy,name+"-broker.xml");
+
+			configFile.delete();
+			
+			io.out.println("");
+			io.out.println("Default ActiveMQ Broker ("+name+") configuration file created at: "+configFile.getPath()+" removed.");
+			io.out.println("");
+			
+		} catch (Exception e) {
+			e.printStackTrace();
+			throw e;
+		}
+
+        return 0;
+    }
+	
+
+	public String getName() {
+		if( name ==  null ) {
+    		File base = new File(System.getProperty("servicemix.base"));
+    		name = base.getName();
+		}
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+}

Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/DestroyBrokerCommand.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/java/org/apache/servicemix/kernel/gshell/activemq/DestroyBrokerCommand.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml?rev=652560&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml Thu May  1 08:42:48 2008
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<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"
+       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://www.springframework.org/schema/osgi-compendium
+  http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
+  ">
+	
+    <!-- wrapper commands -->
+    <bean id="create-broker" class="org.apache.servicemix.kernel.gshell.activemq.CreateBrokerCommand" />
+    <bean id="destroy-broker" class="org.apache.servicemix.kernel.gshell.activemq.DestroyBrokerCommand" />
+    
+    <osgi:service ref="create-broker" interface="org.apache.geronimo.gshell.command.Command">
+      <osgi:service-properties>
+        <entry key="shell" value="activemq"/>
+      	<entry key="name" value="create-broker"/>
+      </osgi:service-properties>
+    </osgi:service>
+
+    <osgi:service ref="destroy-broker" interface="org.apache.geronimo.gshell.command.Command">
+      <osgi:service-properties>
+        <entry key="shell" value="activemq"/>
+      	<entry key="name" value="destroy-broker"/>
+      </osgi:service-properties>
+    </osgi:service>
+    
+</beans>
\ No newline at end of file

Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/apache/servicemix/kernel/gshell/activemq/broker.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/apache/servicemix/kernel/gshell/activemq/broker.xml?rev=652560&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/apache/servicemix/kernel/gshell/activemq/broker.xml (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/apache/servicemix/kernel/gshell/activemq/broker.xml Thu May  1 08:42:48 2008
@@ -0,0 +1,102 @@
+<!--
+    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.
+-->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:amq="http://activemq.apache.org/schema/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd   
+  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
+
+    <!-- Allows us to use system properties as variables in this configuration file -->
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${servicemix.base}/data/activemq/localhost">
+
+        <!-- Destination specific policies using destination names or wildcards -->
+        <destinationPolicy>
+            <policyMap>
+                <policyEntries>
+                    <policyEntry queue=">" memoryLimit="5mb"/>
+                    <policyEntry topic=">" memoryLimit="5mb">
+                        <subscriptionRecoveryPolicy>
+                            <lastImageSubscriptionRecoveryPolicy/>
+                        </subscriptionRecoveryPolicy>
+                    </policyEntry>
+                </policyEntries>
+            </policyMap>
+        </destinationPolicy>
+
+        <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
+        <managementContext>
+            <managementContext createConnector="false"/>
+        </managementContext>
+
+        <!-- The store and forward broker networks ActiveMQ will listen to -->
+        <networkConnectors>
+            <!-- by default just auto discover the other brokers -->
+            <networkConnector name="default-nc" uri="multicast://default"/>
+            <!-- Example of a static configuration:
+            <networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
+            -->
+        </networkConnectors>
+
+        <persistenceAdapter>
+            <amqPersistenceAdapter syncOnWrite="false" directory="${servicemix.base}/data/activemq/localhost" maxFileLength="20 mb"/>
+        </persistenceAdapter>
+
+        <!-- Use the following if you wish to configure the journal with JDBC -->
+        <!--
+        <persistenceAdapter>
+            <journaledJDBC dataDirectory="${activemq.base}/data" dataSource="#postgres-ds"/>
+        </persistenceAdapter>
+        -->
+
+        <!-- Or if you want to use pure JDBC without a journal -->
+        <!--
+        <persistenceAdapter>
+            <jdbcPersistenceAdapter dataSource="#postgres-ds"/>
+        </persistenceAdapter>
+        -->
+
+        <!--  The maximum about of space the broker will use before slowing down producers -->
+        <systemUsage>
+            <systemUsage>
+                <memoryUsage>
+                    <memoryUsage limit="20 mb"/>
+                </memoryUsage>
+                <storeUsage>
+                    <storeUsage limit="1 gb" name="foo"/>
+                </storeUsage>
+                <tempUsage>
+                    <tempUsage limit="100 mb"/>
+                </tempUsage>
+            </systemUsage>
+        </systemUsage>
+
+
+        <!-- The transport connectors ActiveMQ will listen to -->
+        <transportConnectors>
+            <transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
+            <transportConnector name="stomp" uri="stomp://localhost:61613"/>
+        </transportConnectors>
+
+    </broker>
+
+</beans>
+
+

Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/apache/servicemix/kernel/gshell/activemq/broker.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/apache/servicemix/kernel/gshell/activemq/broker.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-activemq/src/main/resources/org/apache/servicemix/kernel/gshell/activemq/broker.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/BundleLevel.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/BundleLevel.java?rev=652560&r1=652559&r2=652560&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/BundleLevel.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/BundleLevel.java Thu May  1 08:42:48 2008
@@ -29,7 +29,7 @@
  * Time: 12:37:30 PM
  * To change this template use File | Settings | File Templates.
  */
-@CommandComponent(id="osgi:bundleLevel", description="Get or set the start level of a given bundle")
+@CommandComponent(id="osgi:bundle-level", description="Get or set the start level of a given bundle")
 public class BundleLevel extends BundleCommand {
 
     @Argument(required = false, index = 1)

Modified: servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/ListBundles.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/ListBundles.java?rev=652560&r1=652559&r2=652560&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/ListBundles.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/ListBundles.java Thu May  1 08:42:48 2008
@@ -31,7 +31,7 @@
  * Time: 9:44:20 AM
  * To change this template use File | Settings | File Templates.
  */
-@CommandComponent(id="osgi:listBundles", description="List bundles")
+@CommandComponent(id="osgi:list-bundles", description="List bundles")
 public class ListBundles extends OsgiCommandSupport {
 
     @Option(name = "-l", description = "Show locations")

Modified: servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/StartLevel.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/StartLevel.java?rev=652560&r1=652559&r2=652560&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/StartLevel.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/geronimo/gshell/osgi/StartLevel.java Thu May  1 08:42:48 2008
@@ -30,7 +30,7 @@
  * Time: 12:37:30 PM
  * To change this template use File | Settings | File Templates.
  */
-@CommandComponent(id="osgi:startLevel", description="Get or set the start level")
+@CommandComponent(id="osgi:start-level", description="Get or set the start level")
 public class StartLevel extends OsgiCommandSupport {
 
     @Argument(required = false, index = 0)

Modified: servicemix/smx4/kernel/trunk/gshell/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/pom.xml?rev=652560&r1=652559&r2=652560&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/pom.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/pom.xml Thu May  1 08:42:48 2008
@@ -34,6 +34,7 @@
     <name>Apache ServiceMix Kernel :: GShell</name>
 
     <modules>
+        <module>gshell-activemq</module>
         <module>gshell-core</module>
         <module>gshell-osgi</module>
         <module>gshell-obr</module>