Bug 1040709 - Unable to add cached-connection-manager after removing it once
Summary: Unable to add cached-connection-manager after removing it once
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JCA
Version: 6.1.1,6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: EAP 6.4.0
Assignee: Stefano Maestri
QA Contact: Martin Simka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-11 23:56 UTC by Masafumi Miura
Modified: 2019-08-19 12:44 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-19 12:44:32 UTC
Type: Bug


Attachments (Terms of Use)

Description Masafumi Miura 2013-12-11 23:56:58 UTC
### 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.

Comment 2 Masafumi Miura 2013-12-12 00:09:51 UTC
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  
~~~

Comment 3 Martin Simka 2014-07-31 14:42:31 UTC
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?


Note You need to log in before you can comment on or make changes to this bug.