Hide Forgot
### Description of problem: <cached-connection-manager> is enabled in jca subsystem by default in JBoss EAP 6: ~~~ <subsystem xmlns="urn:jboss:domain:jca:1.1"> ... <cached-connection-manager /> </subsystem> ~~~ However, it is unable to re-enable cached-connection-manager once it is disabled. ### Version-Release number of selected component (if applicable): I confirmed EAP 6.1.1 and EAP 6.2.0 ### Steps to Reproduce: 1. Start EAP 6 ~~~ ./bin/standalone.sh ~~~ 2. Execute the following CLI: ~~~ /subsystem=jca/cached-connection-manager=cached-connection-manager:remove /subsystem=jca/cached-connection-manager=cached-connection-manager:add ~~~ ### Actual results: Getting the following result at ":add" operation: ~~~ { "outcome" => "failed", "failure-description" => "JBAS014803: Duplicate resource [ (\"subsystem\" => \"jca\"), (\"cached-connection-manager\" => \"cached-connection-manager\") ]", "rolled-back" => true } ~~~ ### Expected results: <cached-connection-manager> should be successfully re-enabled. ### Additional info: Same issue happens on the community version, WildFly 8.0.0.Beta1.
Sorry. Correct CLI to reproduce is: ~~~ /subsystem=jca/cached-connection-manager=cached-connection-manager:remove :reload /subsystem=jca/cached-connection-manager=cached-connection-manager:add ~~~
I'm not sure if this is bug or it is intentional behavior. org.jboss.as.connector.subsystems.jca.JcaExtension public void readElement(final XMLExtendedStreamReader reader, final List<ModelNode> list) throws XMLStreamException { ... case CACHED_CONNECTION_MANAGER: { list.add(parseCcm(reader, address)); ccmAdded = true; break; } .. if (!ccmAdded) { final ModelNode ccmOperation = new ModelNode(); ccmOperation.get(OP).set(ADD); final ModelNode ccmAddress = address.clone(); ccmAddress.add(CACHED_CONNECTION_MANAGER, CACHED_CONNECTION_MANAGER); ccmAddress.protect(); ccmOperation.get(OP_ADDR).set(ccmAddress); list.add(ccmOperation); } When it's not loaded from configuration file it's still added. @Stefano: wdyt?