Bug 1154678 - [EAP6] - Newly created datasource is not enabled even when you have set Enabled=true -- user should be at least warned
Summary: [EAP6] - Newly created datasource is not enabled even when you have set Enabl...
Keywords:
Status: VERIFIED
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.13
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: RHQ 4.13
Assignee: Thomas Segismont
QA Contact: Filip Brychta
URL:
Whiteboard:
Depends On:
Blocks: 1156020
TreeView+ depends on / blocked
 
Reported: 2014-10-20 13:34 UTC by Filip Brychta
Modified: 2018-03-05 15:31 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
: 1156020 (view as bug list)
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1004977 0 high CLOSED Datasource configuration changes SHOULD NOT require a complete reload/restart of EAP 2021-02-22 00:41:40 UTC

Internal Links: 1004977

Description Filip Brychta 2014-10-20 13:34:17 UTC
Description of problem:
$Summary

Version-Release number of selected component (if applicable):
Version :	
4.13.0-SNAPSHOT
Build Number :	
7ceb5f7 

How reproducible:
Always

Steps to Reproduce:
1. create a new datasource (EAP6 standalone->datasources->Create child->DataSource (Standalone))
2. fill in name 'test' and click next
3. Connection Url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1
   Driver Name: h2
   Jndi Name: java:jboss/datasources/test
   (note that Enabled is set to true by default)
4. click Finish



Actual results:
Datasource is correctly created.
Enabled attribute is set to true (visible via both jboss-cli and JON UI)

BUT:
The datasource is not actually enabled, it's just set in the configuration.
User is not informed that reload or enable operation is necessary to actually enable the datasource.

Expected results:
Several options:
- user should be at least informed that reload or enable operation is necessary to actually enable the datasource
- enable operation should be invoked during creation in background (if user selected Enabled:true)

Additional info:
related wildfly jira - https://issues.jboss.org/browse/WFLY-2833

Comment 1 Thomas Segismont 2014-10-27 16:04:05 UTC
Fixed in master

commit d5e65f48de47b1c3258277e5e3e7d16881b679fc
Author: Thomas Segismont <tsegismo>
Date:   Mon Oct 27 17:02:29 2014 +0100

    Bug 1154678 - [EAP6] - Newly created datasource is not enabled even when you have set Enabled=true -- user should be at least warned
    
    When the datasource was created, the 'enabled' attribute was supplied to the EAP6 management interface.
    But setting the attribute to true does not enable the datasource. An extra server reload is needed.
    To enable a datasource without a server reload, the 'enable' operation needs to be called.
    
    So now the DatasourcesComponent class:
    -> no longer supplies the 'enabled' attribute to the CreateResourceDelegate
    -> reads the state of the datasource after creation
    -> invokes the 'enable' or 'disable' operation (as needed) after creation

Comment 2 Thomas Segismont 2014-10-27 21:39:35 UTC
Additional commit in master

commit deff314454c6a055c407429032686054d04e6a31
Author: Thomas Segismont <tsegismo>
Date:   Mon Oct 27 22:38:33 2014 +0100
    
    Fix error in connection properties management code: do not clutter the created datasource Address
    
    (regression detected in Jenkins)

Comment 3 Filip Brychta 2014-10-29 15:11:49 UTC
Verified on
Version :	
4.13.0-SNAPSHOT
Build Number :	
deff314


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