CLI batch job failing to modify XA Datasource Properties

Solution Verified - Updated -

Issue

Trying to write a CLI batch script which modifies 2 properties on XA datasources: ServerName and ServerPort.

Following results in

1 /subsystem=datasources/xa-data-source=xa-ds/xa-datasource-properties=ServerName:add(value=wagoneer)
2 /subsystem=datasources/xa-data-source=xa-ds/xa-datasource-properties=PortNumber:add(value=4301)
{"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "JBAS014803: Duplicate resource [
    (\"subsystem\" => \"datasources\"),
    (\"xa-data-source\" => \"xa-ds\"),
    (\"xa-datasource-properties\" => \"ServerName\")
]"}}

If I try to remove them first and write in the new values I get:

#1 /subsystem=datasources/xa-data-source=xa-ds/xa-datasource-properties=ServerName:remove
#2 /subsystem=datasources/xa-data-source=xa-ds/xa-datasource-properties=PortNumber:remove
#3 /subsystem=datasources/xa-data-source=xa-ds/xa-datasource-properties=ServerName:add(value=wagoneer)
#4 /subsystem=datasources/xa-data-source=xa-ds/xa-datasource-properties=PortNumber:add(value=4301)
{"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "JBAS014762: Removing services has lead to unsatisfied dependencies:
Service jboss.xa-data-source-config.xa-ds.xa-datasource-properties.ServerName was depended upon by service jboss.xa-data-source-config.xa-ds","Operation step-2" => "JBAS014762: Removing services has lead to unsatisfied dependencies:
Service jboss.xa-data-source-config.xa-ds.xa-datasource-properties.PortNumber was depended upon by service jboss.xa-data-source-config.xa-ds"}}

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 6.2.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content