1 Reply Latest reply on Oct 23, 2013 9:13 AM by wdfink

    Possible bug - Issue with EAP 6.1.0 enabling a datasource that is disabled

    andyoverton

      Hi,

       

      I am trying to ascertain if this is a bug in EAP 6.1.0.

       

      If I create a datasource and then disable it and restart the server, when viewing the datasource through the console it shows up as being disabled in the profile view but in the runtime view it shows as enabled.

       

      So sometime during the restart it got updated from false to true, even though in the domain.xml it is still marked as false.

       

      This creates a mismatch between the profile data and runtime data. So when I try to enable it again, it throws the error “Service jboss.data-source-config.mysql is already registered”

       

      The setup is 1 Domain Controller and one Host Controller.

       

      To recreate the issue do the following:

       

      Create a datasource, either via the console or via the CLI:

       

      data-source add --name=mysql --jndi-name= "java:jboss/datasources/mysql" --driver-name=mysql --connection-url= jdbc:mysql://localhost:3306/test --user-name=root --profile=full

       

      Enable the datasource, either via the console or via the CLI:

       

      data-source enable --name=mysql --profile=full

       

      Now, checking in the console under Profiles - Datasources the datasource is listed (correctly) as enabled. Checking under Runtime - Datasources the datasource is listed (correctly) as enabled.

       

      Now, if I disable the datasource either via the console or via the CLI:

       

      data-source disable --name=mysql --profile=full

       

      Checking in the console under Profiles - Datasources the datasource is listed (correctly) as disabled. Checking under Runtime - Datasources the datasource is listed (correctly) as disabled.

       

      However, if I now restart the server....

       

      Checking in the console under Profiles - Datasources the datasource is listed (correctly) as disabled. Checking under Runtime - Datasources the datasource is listed (incorrectly) as enabled.

       

      Looking in the domain.xml it is clearly listed as disabled.

       

      <datasource jndi-name="java:jboss/datasources/mysql" pool-name="mysql" enabled="false">

       

      Now we are in the state where we cannot enable it as it thinks it is already enabled.

       

      Is there some explanation for this behaviour or is it a bug?

       

      Thanks,

       

      Andy Overton

       

      Addition - Doing a bit more searching around it appears that this has been noted as a bug before. However, the bug is listed as fixed. See here: https://bugzilla.redhat.com/show_bug.cgi?id=900586