diff --git a/artemis-rest/pom.xml b/artemis-rest/pom.xml index 745fca6395..6bc615a87c 100644 --- a/artemis-rest/pom.xml +++ b/artemis-rest/pom.xml @@ -46,6 +46,10 @@ org.jboss.logging jboss-logging + + org.jboss.logmanager + jboss-logmanager + org.jboss.resteasy resteasy-jaxrs @@ -111,9 +115,7 @@ org.apache.maven.plugins maven-surefire-plugin - - -Djava.util.logging.config.file=${project.build.directory}/../../../distribution/activemq/src/main/resources/config/stand-alone/non-clustered/logging.properties - + ${activemq-surefire-argline} ${skipRestTests} false false true @@ -218,14 +218,17 @@ values for each. 10 1 300 - -1 + -1 + vm://0 Let's give an explanation of each config option. -- `server-in-vm-id`. The Apache ActiveMQ Artemis REST impl uses the IN-VM transport - to communicate with Apache ActiveMQ Artemis. It uses the default server id, which - is "0". +- `server-in-vm-id`. The Apache ActiveMQ Artemis REST implementation was formerly hard-coded + to use the in-vm transport to communicate with the embedded Apache ActiveMQ Artemis instance. + This is the id of the embedded instance. It is "0" by default. Note: this is deprecated in + favor of `url` which can be used to connect to an arbitrary instance of Apache ActiveMQ + Artemis (including one over the network). - `use-link-headers`. By default, all links (URLs) are published using custom headers. You can instead have the Apache ActiveMQ Artemis REST @@ -265,13 +268,18 @@ Let's give an explanation of each config option. - `consumer-window-size`. For consumers, this config option is the same as the Apache ActiveMQ Artemis one of the same name. It will be used by sessions created by the Apache ActiveMQ Artemis REST implementation. + This is deprecated in favor of `url` as it can be specified as a URL + parameter. + +- `url`. The URL the Apache ActiveMQ Artemis REST implementation should use + to connect to the Apache ActiveMQ Artemis instance. Default to "vm://0". ## Apache ActiveMQ Artemis REST Interface Basics The Apache ActiveMQ Artemis REST interface publishes a variety of REST resources to perform various tasks on a queue or topic. Only the top-level queue and topic URI schemes are published to the outside world. You must discover -all over resources to interact with by looking for and traversing links. +all other resources to interact with by looking for and traversing links. You'll find published links within custom response headers and embedded in published XML representations. Let's look at how this works. @@ -287,12 +295,8 @@ The base of the URI is the base URL of the WAR you deployed the Apache ActiveMQ REST server within as defined in the [Installation and Configuration](#install) section of this document. Replace the `{name}` string within the above URI pattern with the name of the queue or topic -you are interested in interacting with. For example if you have -configured a named "foo" within your `activemq-jms.xml` file, -the URI name should be "foo". If you have configured a JMS -queue name "bar" within your `activemq-jms.xml` file, the URI name -should be "bar". Next, perform your HEAD or GET request on this URI. -Here's what a request/response would look like. +you are interested in interacting with. Next, perform your HEAD or GET +request on this URI. Here's what a request/response would look like. HEAD /queues/bar HTTP/1.1 Host: example.com @@ -309,7 +313,7 @@ Here's what a request/response would look like. > You can use the "curl" utility to test this easily. Simply execute a > command like this: > -> curl --head http://example.com/queues/.bar +> curl --head http://example.com/queues/bar The HEAD or GET response contains a number of custom response headers that are URLs to additional REST resources that allow you to interact @@ -1010,7 +1014,7 @@ resource. acknowledge=true --- Response --- - Http/1.1 200 Ok + Http/1.1 204 Ok msg-acknowledge-next: http://example.com/queues/bar/pull-consumers/333/acknowledge-next-2 @@ -1338,9 +1342,7 @@ headers might look like: You can create a durable queue or topic through the REST interface. Currently you cannot create a temporary queue or topic. To create a queue you do a POST to the relative URL /queues with an XML -representation of the queue. The XML syntax is the same queue syntax -that you would specify in activemq-jms.xml if you were creating a queue -there. For example: +representation of the queue. For example: POST /queues Host: example.com diff --git a/examples/features/standard/rest/dup-send/src/main/resources/broker.xml b/examples/features/standard/rest/dup-send/src/main/resources/broker.xml index 7e5527a8d2..577f5b05fa 100644 --- a/examples/features/standard/rest/dup-send/src/main/resources/broker.xml +++ b/examples/features/standard/rest/dup-send/src/main/resources/broker.xml @@ -27,10 +27,10 @@ under the License. vm://0 - +
- +
diff --git a/examples/features/standard/rest/javascript-chat/src/main/resources/broker.xml b/examples/features/standard/rest/javascript-chat/src/main/resources/broker.xml index d41cd6d4b3..30a5ff323f 100644 --- a/examples/features/standard/rest/javascript-chat/src/main/resources/broker.xml +++ b/examples/features/standard/rest/javascript-chat/src/main/resources/broker.xml @@ -27,7 +27,7 @@ under the License. vm://0 - +
diff --git a/examples/features/standard/rest/javascript-chat/src/main/webapp/index.html b/examples/features/standard/rest/javascript-chat/src/main/webapp/index.html index 87c62f299d..22c9fbf08e 100644 --- a/examples/features/standard/rest/javascript-chat/src/main/webapp/index.html +++ b/examples/features/standard/rest/javascript-chat/src/main/webapp/index.html @@ -148,7 +148,7 @@ under the License. } } - initializeSenderAndTop('jms.topic.chat'); + initializeSenderAndTop('chat'); setTimeout("receiveMessage()", 800); diff --git a/examples/features/standard/rest/jms-to-rest/postOrder.py b/examples/features/standard/rest/jms-to-rest/postOrder.py index e0440f0e2a..a9b96d248b 100644 --- a/examples/features/standard/rest/jms-to-rest/postOrder.py +++ b/examples/features/standard/rest/jms-to-rest/postOrder.py @@ -17,7 +17,7 @@ import httplib, urlparse conn = httplib.HTTPConnection("localhost:8080") -conn.request("HEAD", "/queues/jms.queue.orders") +conn.request("HEAD", "/queues/orders") res = conn.getresponse() createLink = res.getheader("msg-create") print createLink diff --git a/examples/features/standard/rest/jms-to-rest/receiveOrder.py b/examples/features/standard/rest/jms-to-rest/receiveOrder.py index 076978ba6b..2e86515a80 100644 --- a/examples/features/standard/rest/jms-to-rest/receiveOrder.py +++ b/examples/features/standard/rest/jms-to-rest/receiveOrder.py @@ -17,7 +17,7 @@ import httplib, urlparse conn = httplib.HTTPConnection("localhost:8080") -conn.request("HEAD", "/queues/jms.queue.orders") +conn.request("HEAD", "/queues/orders") res = conn.getresponse() consumersLink = res.getheader("msg-pull-consumers") consumersParsed = urlparse.urlparse(consumersLink) diff --git a/examples/features/standard/rest/jms-to-rest/src/main/resources/broker.xml b/examples/features/standard/rest/jms-to-rest/src/main/resources/broker.xml index d481507a9c..1628bdbcef 100644 --- a/examples/features/standard/rest/jms-to-rest/src/main/resources/broker.xml +++ b/examples/features/standard/rest/jms-to-rest/src/main/resources/broker.xml @@ -28,10 +28,10 @@ under the License. vm://0 tcp://localhost:61616 - +
- +
diff --git a/examples/features/standard/rest/push/src/main/resources/broker.xml b/examples/features/standard/rest/push/src/main/resources/broker.xml index 9e91b5ab27..d58574ebc7 100644 --- a/examples/features/standard/rest/push/src/main/resources/broker.xml +++ b/examples/features/standard/rest/push/src/main/resources/broker.xml @@ -31,12 +31,12 @@ under the License.
- +
- +