Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4772

Maintain iteration order for entity bean finders

XMLWordPrintable

      In previous JBoss AS versions (at least in JBoss AS 4.x) if a finder method in an EJB 2.x entity bean returned a collection or enumeration of primary keys in a specific order, the client would receive a collection or enumeration of entities with the same iteration order.

      In JBoss AS 7, the entity bean home interceptor uses a HashSet when producing the collection of entities. This means iteration order is lost and clients receive the entities in random order.

      As a convenience and as a backward compatibility for users migrating from previous JBoss versions, could you consider replacing java.util.HashSet with java.util.LinkedHashSet in org.jboss.as.ejb3.component.entity.interceptors.EntityBeanHomeFinderInterceptorFactory? I would be happy to provide a test case and a pull request with this change.

      Regards,
      Mattias

              jaikiran Jaikiran Pai (Inactive)
              matn_jira Mattias Nilsson Grip (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: