Bug 1156020 - [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: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6
Version: JON 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: CR01
: JON 3.3.0
Assignee: Thomas Segismont
QA Contact: Filip Brychta
URL:
Whiteboard:
Depends On: 1154678
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-23 12:12 UTC by Filip Brychta
Modified: 2014-12-11 13:59 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1154678
Environment:
Last Closed: 2014-12-11 13:59:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 854773 0 medium CLOSED [as7] Unable to enable datasource on creation 2021-02-22 00:41:40 UTC

Internal Links: 854773

Description Filip Brychta 2014-10-23 12:12:19 UTC
+++ This bug was initially created as a clone of Bug #1154678 +++

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 Filip Brychta 2014-10-23 12:13:14 UTC
Visible in Version :	
3.3.0.ER05
Build Number :	
92b6d6a:2cdb528

as well.

Comment 3 Thomas Segismont 2014-10-27 16:07:11 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 4 Thomas Segismont 2014-10-27 21:39:51 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 5 Libor Zoubek 2014-10-29 11:23:16 UTC
branch:  release/jon3.3.x
link:    https://github.com/rhq-project/rhq/commit/42a2d2f80
time:    2014-10-29 12:22:26 +0100
commit:  42a2d2f80c2325f3403ff35cba7fbd9669434525
author:  Thomas Segismont - tsegismo
message: Bug 1154678 - [EAP6] - Newly created datasource is not enabled even when
         you have set Enabled=true -- user should be at least warned
         Fix error in connection properties management code: do not
         clutter the created datasource Address
         (regression detected in Jenkins)
         (cherry picked from commit
         deff314454c6a055c407429032686054d04e6a31) Signed-off-by: Libor
         Zoubek <lzoubek>
         
branch:  release/jon3.3.x
link:    https://github.com/rhq-project/rhq/commit/07c3db0af
time:    2014-10-29 12:22:14 +0100
commit:  07c3db0afe16e0105dc026f1b62b401f52311bf5
author:  Thomas Segismont - tsegismo
message: 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

         (cherry picked from commit
         d5e65f48de47b1c3258277e5e3e7d16881b679fc) Signed-off-by: Libor
         Zoubek <lzoubek>

Comment 6 Simeon Pinder 2014-11-03 19:03:34 UTC
Moving to ON_QA as available to test with latest brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=396547

Comment 7 Filip Brychta 2014-11-04 11:55:55 UTC
Verified on 
Version :	
3.3.0.CR01
Build Number :	
08c2f39:6ac97ac


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