activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-476 example fixes/docs
Date Thu, 14 Apr 2016 01:29:52 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 64ae8b079 -> edc514196


ARTEMIS-476 example fixes/docs


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/c17f41da
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/c17f41da
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/c17f41da

Branch: refs/heads/master
Commit: c17f41dac7a30ed85df281ea2218c1d7fb0f14f9
Parents: 64ae8b0
Author: jbertram <jbertram@apache.org>
Authored: Mon Apr 11 14:20:19 2016 -0500
Committer: jbertram <jbertram@apache.org>
Committed: Wed Apr 13 10:53:14 2016 -0500

----------------------------------------------------------------------
 README.md                                       | 11 ++----
 examples/README.md                              | 39 --------------------
 .../src/main/resources/spring-jms-beans.xml     |  2 +-
 .../artemis/jms/example/XAHeuristicExample.java |  3 +-
 .../integration/spring/SpringJmsBootstrap.java  |  4 ++
 5 files changed, 11 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c17f41da/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index d8109a0..b770fb5 100644
--- a/README.md
+++ b/README.md
@@ -29,16 +29,13 @@ To run an example firstly make sure you have run
 
 If the project version has already been released then this is unnecessary.
 
-then you will need to set the following maven options, on Linux by
-
-    $ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=512m"
-
-and the finally run the examples by
+Each individual example can be run using this command from its corresponding directory:
 
     $ mvn verify
 
-You can also run individual examples by running the same command from the directory of which
ever example you want to run.
-NB for this make sure you have installed examples/common.
+If you wish to run groups of examples then use this command from a parent directory (e.g.
examples/features/standard):
+
+    $ mvn -Pexamples verify
 
 ### Recreating the examples
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c17f41da/examples/README.md
----------------------------------------------------------------------
diff --git a/examples/README.md b/examples/README.md
deleted file mode 100644
index 3d0fdd9..0000000
--- a/examples/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-Running the ActiveMQ Artemis Examples
-============================
-
-To run an individual example firstly cd into the example directory and run
-
-```sh
-mvn verify
-```
-
-Most examples offer a way to start them without creating and starting the server (say if
you want to do it manually)
-
-```sh
-mvn verify -PnoServer
-```
-
-If you are running against an un released version, i.e. from master branch, you will have
to run `mvn install` on the root
-pom.xml and the example/activemq-jms-examples-common/pom.xml first.
-
-If you want to run all the examples (except those that need to be run standalone) you can
run `mvn verify -Pexamples` in the examples
-directory but before you do you will need to up the memory used by running:
-
-```
-export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
-```
-
-if you are running a Mac OS, you may want to add this to run the clustered examples:
-
-```
-export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true"
-```
-
-### Recreating the examples
-
-If you are trying to copy the examples somewhere else and modifying them. Consider asking
Maven to explicitly list all the dependencies:
-
-```
-# if trying to modify the 'topic' example:
-cd examples/jms/topic && mvn dependency:list
-```

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c17f41da/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
b/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
index 274a8fa..7db39ea 100644
--- a/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
+++ b/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
@@ -48,7 +48,7 @@ under the License.
    </bean>
 
    <bean id="EmbeddedJms" class="org.apache.activemq.artemis.integration.spring.SpringJmsBootstrap"
init-method="start"
-         destroy-method="stop">
+         destroy-method="close">
        <property name="SecurityManager" ref="securityManager"/>
    </bean>
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c17f41da/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java
b/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java
index 1299f8e..6025b32 100644
--- a/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java
+++ b/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java
@@ -39,6 +39,7 @@ import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.HashMap;
 
+import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
 import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder;
 import org.apache.activemq.artemis.utils.UUIDGenerator;
 
@@ -140,7 +141,7 @@ public class XAHeuristicExample {
          MBeanServerConnection mbsc = connector.getMBeanServerConnection();
 
          // Step 27. List the prepared transactions
-         ObjectName serverObject = ObjectNameBuilder.DEFAULT.getActiveMQServerObjectName();
+         ObjectName serverObject = ObjectNameBuilder.create(ActiveMQDefaultConfiguration.getDefaultJmxDomain(),
"0.0.0.0", true).getActiveMQServerObjectName();
          String[] infos = (String[]) mbsc.invoke(serverObject, "listPreparedTransactions",
null, null);
 
          System.out.println("Prepared transactions: ");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c17f41da/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java
----------------------------------------------------------------------
diff --git a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java
b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java
index ff45181..3bbfc3d 100644
--- a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java
+++ b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java
@@ -28,4 +28,8 @@ public class SpringJmsBootstrap extends EmbeddedJMS implements BeanFactoryAware
    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
       registry = new SpringBindingRegistry((ConfigurableBeanFactory) beanFactory);
    }
+
+   public void close() throws Exception {
+      stop();
+   }
 }


Mime
View raw message