My IT infrastructure requires persistence based on a SQL Server 2008 R2 database.
I'm trying to configure SQL Server persistence for ActiveMQ 5.9 on windows, but can't figure out a correct configuration schema with or without journalling.
The default configuration uses kahadb, and it works:
<persistenceAdapter>
<kahaDB directory="${activemq.data}/kahadb" />
</persistenceAdapter>
I'm using this documentation a reference to configure SQL Server persistence: http://activemq.apache.org/sqlserver.html
<persistenceAdapter>
<journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data" dataSource="#mssql-ds">
<adapter><imageBasedJDBCAdaptor/></adapter>
</journaledJDBC>
</persistenceAdapter>
<bean id="mssql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<property name="url" value="jdbc:sqlserver://HOST:PORT;databaseName=DBNAME;user=USER;password=PASSWORD"/>
<property name="username" value="USER"/>
<property name="password" value="PASSWORD"/>
</bean>
This is the error in xml parser I get:
ERROR | Failed to load: class path resource [activemq.xml], reason: Line 88 in XML document from class path resource [activemq.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 88; columnNumber: 95; cvc-complex-type.2.4.a: Invalid content was found starting with element 'journaledJDBC'. One of '{"http://activemq.apache.org/schema/core":jdbcPersistenceAdapter, "http://activemq.apache.org/schema/core":journalPersistenceAdapter, "http://activemq.apache.org/schema/core":kahaDB, "http://activemq.apache.org/schema/core":levelDB, "http://activemq.apache.org/schema/core":mKahaDB, "http://activemq.apache.org/schema/core":memoryPersistenceAdapter, "http://activemq.apache.org/schema/core":replicatedLevelDB, WC[##other:"http://activemq.apache.org/schema/core"]}' is expected.
Please help me to figure out the configuration schema for SQL Server persistence, or provide a documentation link specific to version ActiveMQ 5.9
journalPersistenceAdapter
and also the attributes have somewhat changed. The xsd tells you (in an inconvenient format) how the XML document has to look like in order to get parsed without error. – Ralf