All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.extras.creaper.commands.messaging.DisableMessagingSecurity.groovy Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
def address = null

def defHornet = { 'security-enabled' ('false') }
def defArtemis = { 'security' (enabled: 'false') }

if (messagingActivemq) {
    address = messagingActivemq.server
    if ( address.security.any { it.name() == 'security' } ) {
        address.security.@enabled = 'false'
    } else {
        address.appendNode defArtemis
    }
} else if (messagingHornetq) {
    address = messagingHornetq.'hornetq-server'
    if ( address.'security-enabled'.any { it.name() == 'security-enabled' } ) {
        address.'security-enabled'.replaceNode defHornet
    } else {
        address.appendNode defHornet
    }
}
if (!address) {
    throw new IllegalStateException("Neither ActiveMQ nor HornetQ messaging subsystem exists in configuration")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy