glassfish
  1. glassfish
  2. GLASSFISH-7521

application server invokes resource adapter's getInvalidConnections method with empty set

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 9.1.1
    • Fix Version/s: 9.1.1_dev
    • Component/s: jca
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      7,521

      Description

      Under certain circumstances the application server invokes the resource
      adapter's getInvalidConnections(Set) method (from
      ValidatingManagedConnectionFactory) with an empty set.

      The J2EE CA spec says the following about this method.

      The getInvalidConnections method returns a set of invalid ManagedConnection
      objects chosen from a specified set of ManagedConnection objects.

      So it would not make sense to pass an empty set to this method.

      I'm not sure what I'm doing in my application to trigger this issue, but I'm
      basically:

      • opening three connections
      • closing one
      • waiting for it to be destroyed by the idle timeout pool resize task
      • opening and closing another connection
      • waiting for it to be destroyed by the idle timeout pool resize task

      After another 10 sec. (which is the idle timeout I specified) and each 10 sec.
      after that my RA's getInvalidConnections method is called with a Set of size 0.

        Activity

        Hide
        Jagadish added a comment -

        Looking at the use-case, we do
        a) invalidate idle-timeout lapsed resources
        b) validate remaining resources.
        if (a) has removed all resources in the pool, (b) will be empty.

        I do not see that as a issue, but it can be fixed by doing a set.size() > 0
        check and then calling the validation routine.

        Do you see any performance impact because of this ?
        If not, it can be categorized as P4.

        Show
        Jagadish added a comment - Looking at the use-case, we do a) invalidate idle-timeout lapsed resources b) validate remaining resources. if (a) has removed all resources in the pool, (b) will be empty. I do not see that as a issue, but it can be fixed by doing a set.size() > 0 check and then calling the validation routine. Do you see any performance impact because of this ? If not, it can be categorized as P4.
        Hide
        Dies Koper added a comment -

        Fixed in V2.1-next. This piece of code has been refactored in V3 to the extent
        that this issue will not occur any more.

        Checking in AbstractResourcePool.java;
        /cvs/glassfish/appserv-
        core/src/java/com/sun/enterprise/resource/AbstractResourcePool.java,v <--
        AbstractResourcePool.java
        new revision: 1.31.2.8; previous revision: 1.31.2.7
        done

        Show
        Dies Koper added a comment - Fixed in V2.1-next. This piece of code has been refactored in V3 to the extent that this issue will not occur any more. Checking in AbstractResourcePool.java; /cvs/glassfish/appserv- core/src/java/com/sun/enterprise/resource/AbstractResourcePool.java,v <-- AbstractResourcePool.java new revision: 1.31.2.8; previous revision: 1.31.2.7 done

          People

          • Assignee:
            Jagadish
            Reporter:
            Dies Koper
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: