[jboss-jira] [JBoss JIRA] (AS7-4772) Maintain iteration order for entity bean finders

Mattias Nilsson Grip (JIRA) jira-events at lists.jboss.org
Wed May 23 08:59:18 EDT 2012


    [ https://issues.jboss.org/browse/AS7-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695076#comment-12695076 ] 

Mattias Nilsson Grip commented on AS7-4772:
-------------------------------------------

The pull request now contains integration tests for both BMP and CMP. I was not able to reproduce the problem for CMP. It seems to be a BMP problem only. For CMP a different interceptor factory is used (org.jboss.as.cmp.component.interceptors.CmpEntityBeanHomeFinderInterceptorFactory) and that one does not change the iteration order of collections/enumerations.
                
> Maintain iteration order for entity bean finders
> ------------------------------------------------
>
>                 Key: AS7-4772
>                 URL: https://issues.jboss.org/browse/AS7-4772
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: EJB
>    Affects Versions: 7.1.1.Final, 7.1.2.Final (EAP)
>            Reporter: Mattias Nilsson Grip
>            Assignee: jaikiran pai
>              Labels: ejb2, find, interceptor, iterators, sorting
>
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list