Bug 1084499 - Only flush idle connections in resource adapters
Summary: Only flush idle connections in resource adapters
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Console
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: DR2
: EAP 6.4.0
Assignee: Harald Pehl
QA Contact: Pavel Jelinek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-04 13:58 UTC by Harald Pehl
Modified: 2019-08-19 12:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-19 12:38:33 UTC
Type: Enhancement
Embargoed:


Attachments (Terms of Use)
RAR (9.23 KB, application/x-rar)
2014-04-04 13:58 UTC, Harald Pehl
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker HAL-389 0 Major Resolved Enable multiple flush operations for connection definitions in resource adapters 2018-08-09 08:05:16 UTC

Description Harald Pehl 2014-04-04 13:58:34 UTC
Created attachment 882720 [details]
RAR

The current call of flush(true) will also remove connections that are actively in use by a client.  The behavior of destroying active connections may be desired additional functionality but should not be the default behavior for the flush.

Setup:
Clean EAP 6.2.2 with TRACE JCA logging on default standalone.xml and adding [1].


1) Profile -> Subsystems -> Connectors -> Resource Adapters
2) Select or View the desired Resource Adapter -> Connection Definition
3) Select "Pool"
4) Select "Flush"

[1]
        <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">
            <resource-adapters>
                <resource-adapter id="gss.rar">
                    <archive>
                        gss.rar
                    </archive>
                    <transaction-support>XATransaction</transaction-support>
                    <connection-definitions>
                        <connection-definition class-name="org.redhat.gss.AcmeManagedConnectionFactory" jndi-name="java:jboss/eis/AcmeConnection" enabled="true" use-java-context="true" pool-name="AcmeConnection" use-ccm="true">
                            <xa-pool>
                                <min-pool-size>5</min-pool-size>
                                <max-pool-size>10</max-pool-size>
                                <prefill>true</prefill>
                                <use-strict-min>true</use-strict-min>
                                <flush-strategy>FailingConnectionOnly</flush-strategy>
                                <pad-xid>false</pad-xid>
                                <wrap-xa-resource>true</wrap-xa-resource>
                            </xa-pool>
                            <recovery no-recovery="true">
                                <recover-credential>
                                    <user-name>user</user-name>
                                    <password>password</password>
                                </recover-credential>
                            </recovery>
                        </connection-definition>
                    </connection-definitions>
                    <admin-objects>
                        <admin-object class-name="org.redhat.gss.AcmeAdminObjectImpl" jndi-name="java:jboss/eis/ao/AcmeAdminObjectImpl" enabled="true" use-java-context="true" pool-name="AcmeAdminObjectImpl"/>
                    </admin-objects>
                </resource-adapter>
            </resource-adapters>
        </subsystem>

Comment 1 Harald Pehl 2014-04-09 10:18:22 UTC
I'm trying to rebuild your setup. I added the subsystem configuration and deployed the gss.rar. What I don't fully understand is what you mean with "flush(true)"? Looking at the available management operations, I can see two flush operations:

[standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=gss.rar/connection-definitions=AcmeConnection:read-operation-names        {
    "outcome" => "success",
    "result" => [
        "add",
        "flush-all-connection-in-pool",
        "flush-idle-connection-in-pool",
        ...
    ]
}

The "Flush" button in the console is bound to "flush-all-connection-in-pool". Are you referring to this operation when saying "flush(true)"?

Comment 2 jolee 2014-04-09 16:24:34 UTC
Yes.  flush-idle-connection-in-pool will destroy all active connections (flush(true)) which may not be desired.  It would be best to display both options.  ie:  "flush all connections" and "flush idle connections".  I'm not sure how (or if) supplemental information is wired in,  but it would be nice for the admin to know how these can affect a running client.

Comment 3 Harald Pehl 2014-04-10 11:53:41 UTC
To reflect the new requirement I changed the title of this issue

Comment 4 Heiko Braun 2014-07-09 13:05:10 UTC
we should change it to use "flush-idle-connection-in-pool"

Comment 5 Jakub Cechacek 2014-07-16 12:02:07 UTC
Moving to 6.4 as the issue is still valid for 6.3

Comment 6 JBoss JIRA Server 2014-09-17 15:26:44 UTC
Harald Pehl <hpehl> updated the status of jira HAL-389 to Coding In Progress

Comment 7 JBoss JIRA Server 2014-09-18 11:29:18 UTC
Harald Pehl <hpehl> updated the status of jira HAL-389 to Resolved

Comment 8 Pavel Jelinek 2014-11-26 09:30:44 UTC
Should this still remain in POST state?

Comment 9 Pavel Jelinek 2014-12-12 09:47:59 UTC
Verified for EAP 6.4.0.DR13


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