KahaDb properties in Grails

Rafael

Using ActiveMQ in Grails through JMS plugin I cannot figure how to set KahaDb persistence properties.

Tried something like:

amq.broker(useJmx: true, persistent: true) {
    amq.transportConnectors() {
        amq.transportConnector(uri: "tcp://0.0.0.0:61616")
    }
    amq.persistenceAdapter() {
        amq.kahaDB(directory:${application.config.grails.moviesxd.activemq.kahadb},
                   checksumJournalFiles:true,
                   checkForCorruptJournalFiles:true,
                   ignoreMissingJournalfiles:true)          
    }
}

But i get

groovy.lang.GroovyRuntimeException: Namespace prefix: kahadb is not bound to a URI

Seems like kahadb prefix is not recognized but i cannot find documentation anywhere on how to do this.

Burt Beckwith

You're just missing the equivalent of

xmlns:amq='http://activemq.apache.org/schema/core'

which would be

xmlns amq:'http://activemq.apache.org/schema/core'

(see the reference docs for more info - search for "Using Spring Namespaces")

so the whole conversion would be

import org.springframework.jms.connection.SingleConnectionFactory

xmlns amq:'http://activemq.apache.org/schema/core'

amq.broker(useJmx: true, persistent: true) {
    amq.transportConnectors {
        amq.transportConnector(uri: 'tcp://0.0.0.0:61616')
    }
    amq.persistenceAdapter {
        amq.kahaDB(directory: application.config.grails.moviesxd.activemq.kahadb,
                   checksumJournalFiles: true,
                   checkForCorruptJournalFiles: true,
                   ignoreMissingJournalfiles: true)
    }
}

amq.connectionFactory(id: 'amqConnectionFactory', brokerURL: 'vm://localhost')

jmsConnectionFactory(SingleConnectionFactory, ref('amqConnectionFactory'))

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Grails get domain properties

grails GORM derived properties

Grails - include id property when calling .properties

Read properties file from java class in Grails

Display message from properties file in Grails

Grails Criteria Projections - Distinct Projection by two properties

How to add properties file to classpath in Grails

How to correctly concatenate two message properties in Grails?

Grails messages.properties typeMismatch error messages

Inherited grails domain classes missing dynamic properties

Grails "war" invocation not passing extra properties to Gradle

ActiveMQ KahaDB always locking and waiting

Migrate data from Kahadb to MKahadb

Grails 3 plugin using properties from application.yml

Include transient domain class properties as restful json or xml response in grails

Why does Grails Scaffolding plugin limits the amount of displayed properties?

How to use Grails bindData when using collections in entity fields and properties

standalone gorm - grails 2.4 - messages.properties not getting loaded

Changing properties in Grails 3 application yml file through gradle

Groovy/Grails - Json web service, map received with extra properties

Grails Domain Design: inheritance or one class with nullable properties?

Grails 3 Entity not saved when properties set in EntityClass

Grails - grails.config.locations don't work with classpath and .properties file

ActiveMQ won't restart because KahaDB is locked

Is there way to see kahaDB logs in AWS using amazonMQ?

grails, java - Using ECMAScript 6 unicode code point escapes in message.properties

How to get all the persistent properties of a grails Domain Class along with their constraints in a single Collection?

Grails 3 parsing of hash map properties with "." in key not working as expected in earlier versions

What is the maximum number of xxx of db-xxx in kahaDB (ActiveMQ)?

TOP Ranking

HotTag

Archive