Bug 929200

Summary: RFE: [as7] Use Commons HttpClient in ASConnection instead of JDK's HttpUrlConnection
Product: [JBoss] JBoss Operations Network Reporter: Thomas Segismont <tsegismo>
Component: Plugin -- JBoss EAP 6Assignee: Thomas Segismont <tsegismo>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: urgent    
Version: JON 3.1.2CC: hrupp, loleary
Target Milestone: ER01   
Target Release: JON 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 929198
: 950660 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 929198    
Bug Blocks: 918677, 950660, 953152    

Description Thomas Segismont 2013-03-29 13:23:16 UTC
+++ This bug was initially created as a clone of Bug #929198 +++

In AS7 plugin, ASConnection class currently uses JDK's HttpUrlConnection to communicate with an AS7 instance.

This class should be updated to use Commons HttpClient, like ASUploadConnection class does since release 4.6 (see BZ887320)

Commons HttpClient gives us more control on the communication process and has proven to be more reliable.

Comment 1 Thomas Segismont 2013-03-29 13:28:38 UTC
See BZ918677 for the type of problems we have with JDK's HttpUrlConnection

Comment 2 Charles Crouch 2013-03-29 14:34:29 UTC
Since this seems to be related more to fixing a bug than adding a feature I've removed the FutureFeature keyword. I've also unset the Target Release field to make sure this gets triaged.

A change in the http library used by the AS7 plugin will require a full regression test run, since http communication is used so widely to talk to AS7

Comment 3 Thomas Segismont 2013-04-02 08:57:36 UTC
BZ918677 has been partially fixed (only works on some platforms). Moving ASConnection to Commons HttpClient will allow to get rid of the problem on all platforms.

ASConnection is the core communication component of AS7 plugin. Changing its implementation will involve extensive non regression testing from QE before the next JON release. But as ASUploadConnection has already been moved to commons HttpClient due to BZ887320, it has to be done anyway.

As for the benefits of this change:
* cohesion between ASConnection and ASUploadConnection implementations
* easier debugging as JDK's HttpUrlConnection is closed source (at least in Oracle's VM)
* Commons HttpClient gives the developer more control on the communication process (when/how open or close connections, configurable pooling, unshared authentication)

Comment 4 Thomas Segismont 2013-04-02 09:56:28 UTC
And for the risks.

No instance of HttpUrlConnection is shared outside ASConnection. So components in AS7 plugin only rely on ASConnection contract.

Consequently, while ASConnection is the core communication component of AS7 plugin, the risk of regression is very low.

Comment 5 Thomas Segismont 2013-04-08 21:42:52 UTC
Fixed in master - 21ec5e2

AS7 plugin itests passed succesfully

Beware that this touches the core connection part (ASConnection class) and hence requires a full non regresssion testing of AS7 plugin.

Comment 6 Thomas Segismont 2013-04-09 10:08:13 UTC
Reworked to increased delay in AS7 itests to discover all resources
master - 3b18013

Comment 7 Thomas Segismont 2013-04-10 15:16:54 UTC
All as7 plugin unit and integration tests pass on my box and on Jenkins:
https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/RHQ/job/rhq-master/org.rhq$rhq-jboss-as-7-plugin/

Comment 8 Thomas Segismont 2013-04-12 15:12:31 UTC
*** Bug 913737 has been marked as a duplicate of this bug. ***

Comment 9 Larry O'Leary 2013-04-17 14:58:55 UTC
Moving back to ON_DEV as this fix seems to introduce regressions. See comment in downstream bug 951738#c4.

Comment 10 Thomas Segismont 2013-04-25 07:24:39 UTC
Moving to MODIFIED as regressions were adressed

Comment 11 Larry O'Leary 2013-09-06 14:33:42 UTC
As this is MODIFIED or ON_QA, setting milestone to ER1.

Comment 12 Larry O'Leary 2013-09-06 14:34:25 UTC
As this is MODIFIED or ON_QA, setting milestone to ER01.

Comment 13 Mike Foley 2013-09-13 19:21:22 UTC
this was verified