You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by cc...@apache.org on 2009/09/27 00:19:03 UTC
svn commit: r819227 - in /servicemix/smx4/features/trunk:
activemq/activemq-commands/pom.xml
activemq/activemq-commands/src/main/java/org/apache/servicemix/activemq/commands/ActiveMQCommandSupport.java
pom.xml
Author: ccustine
Date: Sat Sep 26 22:19:02 2009
New Revision: 819227
URL: http://svn.apache.org/viewvc?rev=819227&view=rev
Log:
SMX4-309 Problem in ActiveMQ command documentation and/or implementation
- Changed osgi core version to fix itests (now matches NMR)
- Removed extra dependencies
Modified:
servicemix/smx4/features/trunk/activemq/activemq-commands/pom.xml
servicemix/smx4/features/trunk/activemq/activemq-commands/src/main/java/org/apache/servicemix/activemq/commands/ActiveMQCommandSupport.java
servicemix/smx4/features/trunk/pom.xml
Modified: servicemix/smx4/features/trunk/activemq/activemq-commands/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/activemq/activemq-commands/pom.xml?rev=819227&r1=819226&r2=819227&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/activemq/activemq-commands/pom.xml (original)
+++ servicemix/smx4/features/trunk/activemq/activemq-commands/pom.xml Sat Sep 26 22:19:02 2009
@@ -48,11 +48,6 @@
<artifactId>org.osgi.core</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
Modified: servicemix/smx4/features/trunk/activemq/activemq-commands/src/main/java/org/apache/servicemix/activemq/commands/ActiveMQCommandSupport.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/activemq/activemq-commands/src/main/java/org/apache/servicemix/activemq/commands/ActiveMQCommandSupport.java?rev=819227&r1=819226&r2=819227&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/activemq/activemq-commands/src/main/java/org/apache/servicemix/activemq/commands/ActiveMQCommandSupport.java (original)
+++ servicemix/smx4/features/trunk/activemq/activemq-commands/src/main/java/org/apache/servicemix/activemq/commands/ActiveMQCommandSupport.java Sat Sep 26 22:19:02 2009
@@ -36,44 +36,44 @@
@Argument(index=0, multiValued=true, required=true)
private Collection<String> arguments = null;
- protected Object doExecute() throws Exception {
- final String[] args = toStringArray(arguments.toArray());
+ protected Object doExecute() throws Exception {
+ final String[] args = toStringArray(arguments.toArray());
- CommandContext context2 = new CommandContext();
- context2.setFormatter(new CommandShellOutputFormatter(System.out));
- Command currentCommand = command.getClass().newInstance();
-
- try {
- currentCommand.setCommandContext(context2);
- currentCommand.execute(new ArrayList<String>(Arrays.asList(args)));
- return null;
- } catch (Throwable e) {
- Throwable cur = e;
- while (cur.getCause() != null) {
- cur = cur.getCause();
- }
- if (cur instanceof java.net.ConnectException) {
- context2
- .print("\n"
- + "Could not connect to JMX server. This command requires that the remote JMX server be enabled.\n"
- + "This is typically done by adding the following JVM arguments: \n"
- + " -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false \n"
- + " -Dcom.sun.management.jmxremote.ssl=false \n" + "\n"
- + "The connection error was: " + cur + "\n");
- } else {
- if (e instanceof Exception) {
- throw (Exception)e;
- } else {
- throw new RuntimeException(e);
+ CommandContext context2 = new CommandContext();
+ context2.setFormatter(new CommandShellOutputFormatter(System.out));
+ Command currentCommand = command.getClass().newInstance();
+
+ try {
+ currentCommand.setCommandContext(context2);
+ currentCommand.execute(new ArrayList<String>(Arrays.asList(args)));
+ return null;
+ } catch (Throwable e) {
+ Throwable cur = e;
+ while (cur.getCause() != null) {
+ cur = cur.getCause();
}
+ if (cur instanceof java.net.ConnectException) {
+ context2
+ .print("\n"
+ + "Could not connect to JMX server. This command requires that the remote JMX server be enabled.\n"
+ + "This is typically done by adding the following JVM arguments: \n"
+ + " -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false \n"
+ + " -Dcom.sun.management.jmxremote.ssl=false \n" + "\n"
+ + "The connection error was: " + cur + "\n");
+ } else {
+ if (e instanceof Exception) {
+ throw (Exception)e;
+ } else {
+ throw new RuntimeException(e);
+ }
+ }
}
- }
- return null;
+ return null;
- }
+ }
- public Command getCommand() {
+ public Command getCommand() {
return command;
}
Modified: servicemix/smx4/features/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/pom.xml?rev=819227&r1=819226&r2=819227&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/pom.xml (original)
+++ servicemix/smx4/features/trunk/pom.xml Sat Sep 26 22:19:02 2009
@@ -101,7 +101,7 @@
<felix.fileinstall.version>2.0.0</felix.fileinstall.version>
<felix.framework.version>2.0.0</felix.framework.version>
<felix.karaf.version>1.1.0-SNAPSHOT</felix.karaf.version>
- <felix.osgi.version>1.2.0</felix.osgi.version>
+ <felix.osgi.version>1.4.0</felix.osgi.version>
<felix.plugin.version>2.0.0</felix.plugin.version>
<felix.prefs.version>1.0.2</felix.prefs.version>
<flatpack.version>3.1.1_1</flatpack.version>
@@ -396,16 +396,6 @@
<version>${felix.osgi.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>${felix.osgi.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>${felix.osgi.version}</version>
- </dependency>
- <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>