Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C135711530 for ; Tue, 10 Jun 2014 16:21:05 +0000 (UTC) Received: (qmail 32175 invoked by uid 500); 10 Jun 2014 16:21:05 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 32134 invoked by uid 500); 10 Jun 2014 16:21:05 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 32126 invoked by uid 99); 10 Jun 2014 16:21:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2014 16:21:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2014 16:21:01 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1657023889ED for ; Tue, 10 Jun 2014 16:20:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r912127 [2/2] - in /websites/production/activemq/content: 2014/ 2014/06/ 2014/06/10/ 2014/06/10/apache-activemq-5100-released.html activemq-5100-release.html cache/main.pageCache download.html index.html news.html xml-reference.html Date: Tue, 10 Jun 2014 16:20:40 -0000 To: commits@activemq.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140610162041.1657023889ED@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: websites/production/activemq/content/xml-reference.html ============================================================================== --- websites/production/activemq/content/xml-reference.html (original) +++ websites/production/activemq/content/xml-reference.html Tue Jun 10 16:20:40 2014 @@ -82,56 +82,26 @@ -

ActiveMQ Xml Reference

- -

This page contains a link to the XML reference guides and XML schema documents for Xml Configuration with ActiveMQ releases

- -

Released Schemas

- -

Reference Document

Reference

XML Schema

XML Schema namespace

XBean XML Reference 4.1

Reference

http://activemq.apache.org/schema/core/activemq-core-4.1.2.xsd

http://activemq.org/config/1.0

XBean XML Reference 5.0

Reference

http://activemq.apache.org/schema/core/activemq-core-5.0.0.xsd

http://activemq.org/config/1.0

XBean XML Reference 5.1

< /td>

Reference

http://activemq.apache.org/schema/core/activemq-core-5.1.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.2

Reference

http://activemq.apache.org/schema/core/activemq-core-5.2.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.3.0

Reference

http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd

ht tp://activemq.apache.org/schema/core

XBean XML Reference 5.3.1

Reference

http://activemq.apache.org/schema/core/activemq-core-5.3.1.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.3.2

Reference

http://activemq.apache.org/schema/core/activemq-core-5.3.2.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.4.0

Reference

http://activemq.apache.org/schema/core/activemq-core-5.4.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.4.1

Reference

http://activemq.apache.org/schema/core/activemq-core-5.4.1.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.4.2

Reference

http://activemq.apache.org/schema/core/activemq-core-5.4.2.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.5.0

Reference

http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.6.0

Reference

http://activemq.apache.org/schema/core/activemq-core-5.6.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.7.0

Reference

http://activemq.apache.org/schema/core/activemq-core-5.7.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.8.0

Reference

http://activemq.apache.org/schema/core/activemq-core-5.8.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.9.0

Reference

http://activemq.apache.org/schema/core/activ emq-core-5.9.0.xsd

http://activemq.apache.org/schema/core

- - -

Using the XSDs in configuration files

- -

If you are using XBean to parse the XML configurations, the XML validation is optional so you do not need to specify the XML Schema Locations. However if you are using Spring's 2.0 XML handling to parse the XML then you need to refer to the XSD locations in your XML document because Spring uses schema namespace or schema location to resolve namespace handlers. Without correct namespace definition you will get messages like below:

-
+

ActiveMQ Xml Reference

This page contains a link to the XML reference guides and XML schema documents for Xml Configuration with ActiveMQ releases

Released Schemas

< td colspan="1" rowspan="1" class="confluenceTd">

http://activemq.apache.org/schema/core

Reference Document

Reference

XML Schema

XML Schema namespace

XBean XML Reference 4.1

Reference

http://activemq.apache.org/schema/core/activemq-core-4.1.2.xsd

http://activemq.org/config/1.0

XBean XML Reference 5.0

Reference

http://activemq.apache.org/sc hema/core/activemq-core-5.0.0.xsd

http://activemq.org/config/1.0

XBean XML Reference 5.1

Reference

http://activemq.apache.org/schema/core/activemq-core-5.1.0.xsd

http://activemq.apache.org/schema/core

XB ean XML Reference 5.2

Reference

http://activemq.apache.org/schema/core/activemq-core-5.2.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.3.0

Reference

http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.3.1

Reference

http://activemq.apache.org/schema/core/activemq-core-5.3.1.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.3.2

Reference

http://activemq.apache.org/schema/core/activemq-core-5.3.2.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.4.0

Reference

http://activemq.apache.org/schema/core/activemq-core-5.4.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.4.1

Reference

http://activemq.apache.org/schema/core/activemq-core-5.4.1.xsd

XBean XML Reference 5.4.2

Reference

http://activemq.apache.org/schema/core/activemq-core-5.4.2.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.5.0

Reference

http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.6.0

Reference

http://activemq.apache.org/schema/core/activemq-core-5.6.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.7.0

Reference

http://activemq.apache.org/schema/core/activemq-core-5.7.0.xsd

http://activemq.apache.org/s chema/core

XBean XML Reference 5.8.0

Reference

http://activemq.apache.org/schema/core/activemq-core-5.8.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.9.0

Refe rence

http://activemq.apache.org/schema/core/activemq-core-5.9.0.xsd

http://activemq.apache.org/schema/core

XBean XML Reference 5.10.0Referencehttp://activemq.apache.org/schema/core/activemq-core-5.10.0.xsdhttp://activemq.apache.org/schema/core

Using the XSDs in configuration files

If you are using XBean to parse the XML configurations, the XML validation is optional so you do not need to specify the XML Schema Locations. However if you are using Spring's 2.0 XML handling to parse the XML then you need to refer to the XSD locations in your XML document because Spring uses schema namespace or schema location to resolve namespace handlers. Without correct namespace definition you will get messages like below:

-
- -

You can refer to a specific version of the XSD in your XML as follows

- -
- -
- -

or if you prefer you can use a generic XSD without the version number

- -
- -
-

Your IDE won't be able to fetch this XSD, you'll have to manually associate a specific release; however it does mean that you won't have to upgrade your XML config file with each ActiveMQ release; as it will resolve this XSD using the bundled XSD inside the activemq-core.jar.

- -

Pay attention to the namespace

- -

If you use ActiveMQ 5.0 or earlier you XML namespace definition should point to http://activemq.org/config/1.0. If you use ActiveMQ 5.1 or later the namespace should point to http://activemq.apache.org/schema/core.

- -
ActiveMQ 5.2 example
- -
- -
ActiveMQ 5.0 example
- -
-

Both examples above are almost the same. Only one difference is xml namespace. You can find more information about the namespace change on activemq-dev topic: ActiveMQ namespace change.

- -

Schema Validation

- -

Note: The xml configuration ordering constraint is removed in 5.6, the broker element

- -

Alphabetically Ordered XML Elements (5.4 - 5.5.1)

- -

XMLSchema:sequence is replaced with an XMLSchema:all

- -

Note: from version 5.4.2, you can disable validation from the command line by appending a query parameter to the xbean url. This will allow you to reuse your existing xml configuration 'as is' if needed.

-
+

Both examples above are almost the same. Only one difference is xml namespace. You can find more information about the namespace change on activemq-dev topic: ActiveMQ namespace change.

Schema Validation

Note: The xml configuration ordering constraint is removed in 5.6, the broker element

Alphabetically Ordered XML Elements (5.4 - 5.5.1)

XMLSchema:sequence is replaced with an XMLSchema:all

Note: from version 5.4.2, you can disable validation from the command line by appending a query parameter to the xbean url. This will allow you to reuse your existing xml configuration 'as is' if needed.

-
- -

Beginning in ActiveMQ 5.4, the XML elements inside the <broker> element must be ordered alphabetically. If you look at the XSD, this has always been the case with ActiveMQ. The difference in 5.4 is that the XML configuration is actually being validated against the XML schema.

- -

For example, the following XML configuration did not present a problem in ActiveMQ 5.3.x:

- -
+

Beginning in ActiveMQ 5.4, the XML elements inside the <broker> element must be ordered alphabetically. If you look at the XSD, this has always been the case with ActiveMQ. The difference in 5.4 is that the XML configuration is actually being validated against the XML schema.

For example, the following XML configuration did not present a problem in ActiveMQ 5.3.x:

-
- -

However, in ActiveMQ 5.4, the XML configuration above would cause an exception similar to the following:

- -
+

However, in ActiveMQ 5.4, the XML configuration above would cause an exception similar to the following:

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistenceAdapter'. One of '{"http://activemq.apache.org/schema/core":producerSystemUsage, "http://activemq.apache.org/schema/core":proxyConnectors, "http://activemq.apache.org/schema/core":regionBroker, "http://activemq.apache.org/schema/core":services, "http://activemq.apache.org/schema/core":shutdownHooks, "http://activemq.apache.org/schema/core":sslContext, "http://activemq.apache.org/schema/core":systemUsage, "http://activemq.apache.org/schema/core":taskRunnerFactory, "http://activemq.apache.org/schema/core":tempDataStore, "http://activemq.apache.org/schema/core":transportConnectorURIs, "http://activemq.apache.org/schema/core":transportConnectors, WC"http://activemq.apache.org/schema/core"}' is expected.

-
- -

To avoid this XML validation error in ActiveMQ 5.4, simply change the ordering of the XML elements so that they are in alphabetical order. Below is an example of the same XML configuration but in alphabetical order:

- -
+

To avoid this XML validation error in ActiveMQ 5.4, simply change the ordering of the XML elements so that they are in alphabetical order. Below is an example of the same XML configuration but in alphabetical order:

-
- -

Configurations can be easily tested against ActiveMQ 5.4 using the ActiveMQ startup script. Below is an example:

- -
-

$ cd $ACTIVEMQ_HOME
-$ ./bin/activemq console xbean:file:/Users/bsnyder/SpringSource/clients/Finra/activemq-example-unordered.xml
-INFO: Using default configuration
-(you can configure options in one of these file: /etc/default/activemq /Users/bsnyder/.activemqrc)

- -

INFO: Invoke the following command to create a configuration file
-./bin/activemq setup [ /etc/default/activemq | /Users/bsnyder/.activemqrc ]

- -

INFO: Using java '/System/Library/Frameworks/JavaVM.framework/Home/bin/java'
-INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C)
-Java Runtime: Apple Inc. 1.6.0_20 /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
- Heap sizes: current=258880k free=253106k max=258880k
- JVM args: -Xms256M -Xmx256M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dcom.sun.management.jmxremote -Dactivemq.classpath=/Users/bsnyder/amq/apache-activemq-5.4.1/conf; -Dactivemq.home=/Users/bsnyder/amq/apache-activemq-5.4.1 -Dactivemq.base=/Users/bsnyder/amq/apache-activemq-5.4.1
-ACTIVEMQ_HOME: /Users/bsnyder/amq/apache-activemq-5.4.1
-ACTIVEMQ_BASE: /Users/bsnyder/amq/apache-activemq-5.4.1
-Loading message broker from: xbean:file:/Users/bsnyder/SpringSource/clients/Finra/activemq-example-unordered.xml
-...

-
+

Configurations can be easily tested against ActiveMQ 5.4 using the ActiveMQ startup script. Below is an example:

+

$ cd $ACTIVEMQ_HOME
$ ./bin/activemq console xbean:file:/Users/bsnyder/SpringSource/clients/Finra/activemq-example-unordered.xml
INFO: Using default configuration
(you can configure options in one of these file: /etc/default/activemq /Users/bsnyder/.activemqrc)

INFO: Invoke the following command to create a configuration file
./bin/activemq setup [ /etc/default/activemq | /Users/bsnyder/.activemqrc ]

INFO: Using java '/System/Library/Frameworks/JavaVM.framework/Home/bin/java'
INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C)
Java Runtime: Apple Inc. 1.6.0_20 /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Heap sizes: current=258880k free=253106k max=258880k
JVM args: -Xms256M -Xmx256M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=log ging.properties -Dcom.sun.management.jmxremote -Dactivemq.classpath=/Users/bsnyder/amq/apache-activemq-5.4.1/conf; -Dactivemq.home=/Users/bsnyder/amq/apache-activemq-5.4.1 -Dactivemq.base=/Users/bsnyder/amq/apache-activemq-5.4.1
ACTIVEMQ_HOME: /Users/bsnyder/amq/apache-activemq-5.4.1
ACTIVEMQ_BASE: /Users/bsnyder/amq/apache-activemq-5.4.1
Loading message broker from: xbean:file:/Users/bsnyder/SpringSource/clients/Finra/activemq-example-unordered.xml
...

+