Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 952277 - disable xa-data-source causes that data-source loses its attribute enabled set to false and after reload it becomes enabled
disable xa-data-source causes that data-source loses its attribute enabled se...
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JCA (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity high
: ER2
: EAP 6.2.0
Assigned To: Stefano Maestri
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-15 10:39 EDT by Radim Hatlapatka
Modified: 2014-05-26 21:27 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When an XA data source was set to `disabled`, and the data source was already `disabled`, the data source was enabled on the next restart. The cause of this issue has now been resolved. In the same circumstances, the data source now remains `disabled`.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-15 11:12:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
smaestri: needinfo+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-1893 Major Resolved Restarting server with a disabled DS enables the DS 2016-04-28 07:24 EDT
JBoss Issue Tracker WFLY-1933 Major Closed Disabled data-source without explicit enabled="false" in configuration xml file is re-enabled again after server reload 2016-04-28 07:24 EDT

  None (edit)
Description Radim Hatlapatka 2013-04-15 10:39:59 EDT
Description of problem:
I have disabled data-source (it even contained attribute enabled="false") and now I am also disabling some xa-data-source. It causes that data-source loses its attribute and with next server reload it becomes available

Version-Release number of selected component (if applicable):
6.1.0.ER4 (also in older builds but till now I had problem to find the cause of the (duplicate resource exception issue) in order to make it reproducible)

How reproducible:
always

Steps to Reproduce:
1. start server and connect via CLI
2. create some data-source (e.g. /subsystem=datasources/data-source=rhqDS:add(driver-name=h2, jndi-name=java:jboss/datasources/rhqDS, connection-url=jdbc:h2:mem:test3) )
3. create some xa-data-source (e.g. /subsystem=datasources/xa-data-source=rhqXADS:add(driver-name=h2, jndi-name=java:jboss/datasources/rhqXADS, xa-datasource-class=org.h2.jdbcx.JdbcDataSource) )
  - don't forget to add valid connection setting (e.g. /subsystem=datasources/xa-data-source=rhqXADS/xa-datasource-properties=URL:add(jdbc:h2:mem:test2) )
4. reload server and disable the data-source (rhqDS in our case)
5. see in the xml file that enabled is set to false for the data-source
6. reload server and disable xa-data-source (see, that the enabled="false" is no longer in the xml file)
7. reload server and see that data-source is enabled again, which causes duplicate resource exception when trying to enable it after that


  
Actual results:
data-source is enabled even though the last operation done on the datasource was disable which was successful

Expected results:
data-source remains disabled even after disabling xa-data-source with server reload

Additional info:
In the end the issue user gets is [1] even though he disabled it with some intermezzo operations with different xa-data-source

[1]
08:40:35,762 ERROR [org.jboss.as.controller.management-operation] (HttpManagementService-threads - 1) JBAS014612: Operation ("enable") failed - address: ([
    {"subsystem" => "datasources"},
    {"data-source" => "rhqDS"}
]): org.jboss.msc.service.DuplicateServiceException: Service jboss.data-source-config.rhqDS is already registered
	at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:227) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:561) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2228) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at org.jboss.as.controller.OperationContextImpl$ContextServiceBuilder.install(OperationContextImpl.java:989) [jboss-as-controller-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.as.connector.subsystems.datasources.DataSourceEnable.addServices(DataSourceEnable.java:199)
	at org.jboss.as.connector.subsystems.datasources.DataSourceEnable$1.execute(DataSourceEnable.java:95)
	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:440) [jboss-as-controller-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:322) [jboss-as-controller-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:229) [jboss-as-controller-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:224) [jboss-as-controller-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:194) [jboss-as-controller-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:115) [jboss-as-controller-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.as.controller.ModelControllerImpl$3.execute(ModelControllerImpl.java:398) [jboss-as-controller-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.as.controller.ModelControllerImpl$3.execute(ModelControllerImpl.java:388) [jboss-as-controller-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.as.domain.http.server.DomainApiHandler.processRequest(DomainApiHandler.java:320) [jboss-as-domain-http-interface-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.as.domain.http.server.DomainApiHandler.doHandle(DomainApiHandler.java:226) [jboss-as-domain-http-interface-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.as.domain.http.server.DomainApiHandler.handle(DomainApiHandler.java:233) [jboss-as-domain-http-interface-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.as.domain.http.server.security.SubjectAssociationHandler.handle(SubjectAssociationHandler.java:51) [jboss-as-domain-http-interface-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78)
	at org.jboss.sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:69)
	at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:81)
	at org.jboss.sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:710)
	at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78)
	at org.jboss.as.domain.http.server.RealmReadinessFilter.doFilter(RealmReadinessFilter.java:47) [jboss-as-domain-http-interface-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.as.domain.http.server.DmrFailureReadinessFilter.doFilter(DmrFailureReadinessFilter.java:45) [jboss-as-domain-http-interface-7.2.0.Final-redhat-4.jar:7.2.0.Final-redhat-4]
	at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:81)
	at org.jboss.sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:682)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_09-icedtea]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_09-icedtea]
	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09-icedtea]
	at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]
Comment 2 JBoss JIRA Server 2013-08-23 06:14:45 EDT
Ivo Studensky <istudens@redhat.com> made a comment on jira WFLY-1933

My PR can be found here:
https://github.com/istudens/wildfly/compare/WFLY-1933
Comment 3 JBoss JIRA Server 2013-08-23 06:42:42 EDT
Ivo Studensky <istudens@redhat.com> made a comment on jira WFLY-1933

The semantics under the {{PERSISTENT}} attribute of the {{enable}} operation should be reviewed again as it seems to be almost useless. The enable operation seems to be always called with {{persistent=true}}, see [1] [2]. Moreover, the result of the enable operation is always persisted despite the value of {{PERSISTENT}} attribute, see [3].

[1] https://github.com/wildfly/wildfly/blob/master/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DsParser.java#L263

[2] https://github.com/wildfly/wildfly/blob/master/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/Constants.java#L599

[3] https://github.com/wildfly/wildfly/blob/master/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourceEnable.java#L86
Comment 4 JBoss JIRA Server 2013-08-23 06:54:35 EDT
Ivo Studensky <istudens@redhat.com> made a comment on jira WFLY-1933

Oh, no. There is another jira WFLY-1893 for this..
Comment 5 JBoss JIRA Server 2013-08-23 07:45:22 EDT
Jesper Pedersen <jpederse@redhat.com> made a comment on jira WFLY-1933

For now, I'll let you close this as a duplicate yourself
Comment 6 JBoss JIRA Server 2013-08-26 06:29:43 EDT
Ivo Studensky <istudens@redhat.com> made a comment on jira WFLY-1933

This duplicates WFLY-1893.
Comment 13 Radim Hatlapatka 2013-11-04 05:42:12 EST
Verified with EAP 6.2.0.ER7
Comment 14 Russell Dickenson 2013-11-07 23:07:01 EST
Attention: Stefano Maestri

Can you please provide brief text appropriate to the Release Notes regarding this issue? I have looked over the code changes briefly but I cannot understand just how this issue was resolved.
Comment 15 Stefano Maestri 2013-11-08 03:13:40 EST
Attention: Russel Dickenson

Release note text: enabled attribute is correctly marshaled on xml when :disable operation is used.


Let me know if you need something else.

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