Bug 1394321

Summary: [GSS](6.4.z) Datasouce can not be disabled when application contains resource-ref in the jboss-web.xml in JBoss EAP 6
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Leticia Konno <lkonno>
Component: jbossasAssignee: Radovan STANCEL <rstancel>
Status: CLOSED WONTFIX QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.4.11CC: fnasser, jason.greene, jwwild, mkouba, msochure, rstancel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-24 19:13:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Leticia Konno 2016-11-11 17:39:29 UTC
Description of problem:

It is not possible to disable a datasource with the following error when application uses resource-ref:

/subsystem=datasources/data-source=ExampleDS:disable{allow-resource-service-restart=true}
{
    "outcome" => "failed",
    "failure-description" => "JBAS014762: Removing services has lead to unsatisfied dependencies:
Service jboss.naming.context.java.jboss.datasources.ExampleDS was depended upon by service jboss.naming.context.java.module.helloworld.helloworld.env.jdbc.DefaultDS",
    "rolled-back" => true
}


Version-Release number of selected component (if applicable):
JBoss EAP 6.4.x

How reproducible:

Configure a resource-ref to datasouce jndi:

<jboss-web>
    <resource-ref>
        <res-ref-name>jdbc/DefaultDS</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <jndi-name>java:jboss/datasources/ExampleDS</jndi-name>
    </resource-ref>
</jboss-web>

and execute disable command with allow-resource-service-restart=true: 

/subsystem=datasources/data-source=ExampleDS:disable{allow-resource-service-restart=true}

It is possible to disable the datasouce using the disable command without allow-resource-service-restart=true:

/profile=${PROFILE}/subsystem=datasources/data-source=ExampleDS:disable
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}

but restart is required.

Actual results:

it is not possible to disable the datasouce without restart.

Expected results:

disable the datasouce with CLI ou management console without restart.