tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Wiesner (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (TOMEE-2234) BMP finder returning more than 256 entities
Date Thu, 13 Dec 2018 08:48:00 GMT

    [ https://issues.apache.org/jira/browse/TOMEE-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16719926#comment-16719926
] 

Martin Wiesner edited comment on TOMEE-2234 at 12/13/18 8:47 AM:
-----------------------------------------------------------------

[~jgallimore]

The issue has originally been reported for 1.7.3 and 7.0.5. Thus, I think it should be fixed
at least at on 7.0.x branch. Could you merge a backport of these changes to 1.7.x, 7.0.x
and/or 7.1.x maintenance branch? If conducted it will compatible with the original report
and fix it consistently with the 8.0.x master branch. 

In this context, I'll wait with resolving this issue for some days/weeks.


was (Author: mawiesne):
[~jgallimore]

The issue has originally been reported for 1.7.3 and 7.0.5. Thus, I think it should be fixed
at least at on 7.0.x branch. Could you merge a backport of these changes to 7.1.x and/or
7.0.x maintenance branch? If conducted it will compatible with the original report and fix
it consistently with the 8.0.x master branch. 

In this context, I'll wait with resolving this issue for some days/weeks.

> BMP finder returning more than 256 entities
> -------------------------------------------
>
>                 Key: TOMEE-2234
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2234
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Core Server
>    Affects Versions: 1.7.3, 7.0.5
>            Reporter: Thomas Lien
>            Assignee: Jonathan Gallimore
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 8.0.0-Final
>
>         Attachments: bmp.zip, sourcecode.zip, ztest.ear.zip, zztest.war
>
>
> Running into a situation where calling an EJB2 BMP finder method that returns more than
256 entities causes subsequent finder calls in the same sessionbean transaction to fail.
>  
> {code:java}
> BigFinderHome bigFinderHome = (BigFinderHome)lookup("BigFinderHome");
> LittleFinderHome littleFinderHome = (LittleFinderHome)lookup("LittleFinderHome");
> for (int i = 1; i < 300; ++i) {
>   // this is a test finder that returns "i" number of entities
>   // once this returns more than 256 it causes the littleFinderHome.findAll
>   // to return BigFinder entities instead of the LittleFinder entities!
>   bigFinderHome.findN(i);
>   Collection littleList = littleFinderHome.findAll();
>   for (Object obj: littleList) {
>     if (!(obj instanceof LittleFinder)) {
>       StringBuilder msg = new StringBuilder();
>       msg.append("Failed with " + i + " records. LittleFinder Remote is actually " +
obj.getClass().getName() + " Implemented interfaces " + Arrays.toString(obj.getClass().getInterfaces()));
>       if (obj instanceof EJBObject) {
>         Object pk = ((EJBObject)obj).getPrimaryKey();
>         msg.append(" Primary key value is " + pk);
>       }
>       throw new EJBException(msg.toString());
>     }
>   }
> }{code}
>  
> I can replicate this 100% of the time by deploying the attached ztest.ear application
and running the FinderTestBean.main function (same as the above code). I have tried this on
TomEE versions 1.7.3 and 7.0.5 and they both have the error.
> The error output of my test is as follows
> 09-07 12:25:13 [SEVERE] EjbTransactionUtil.handleSystemException: Failed with 257 records.
LittleFinder Remote is actually com.sun.proxy.$Proxy142 Implemented interfaces [interface
ztest.BigFinder, interface java.io.Serializable, interface org.apache.openejb.core.ivm.IntraVmProxy] Primary
key value is 1
>  
> Note that in my test I am configured to use simple jndi lookup names in the system.properties
> openejb.jndiname.format=\\{interfaceClass.simpleName}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message