From commits-return-43194-archive-asf-public=cust-asf.ponee.io@tomee.apache.org Tue Sep 11 17:27:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B907E18067A for ; Tue, 11 Sep 2018 17:27:04 +0200 (CEST) Received: (qmail 15693 invoked by uid 500); 11 Sep 2018 15:27:03 -0000 Mailing-List: contact commits-help@tomee.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tomee.apache.org Delivered-To: mailing list commits@tomee.apache.org Received: (qmail 15684 invoked by uid 500); 11 Sep 2018 15:27:03 -0000 Delivered-To: apmail-openejb-commits@openejb.apache.org Received: (qmail 15681 invoked by uid 99); 11 Sep 2018 15:27:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Sep 2018 15:27:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 49F651A1CD9 for ; Tue, 11 Sep 2018 15:27:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id zp2cPtCr7-N8 for ; Tue, 11 Sep 2018 15:27:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id E1CFD5F4ED for ; Tue, 11 Sep 2018 15:27:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id B0704E111B for ; Tue, 11 Sep 2018 15:27:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1F28026B59 for ; Tue, 11 Sep 2018 15:27:00 +0000 (UTC) Date: Tue, 11 Sep 2018 15:27:00 +0000 (UTC) From: "Thomas Lien (JIRA)" To: commits@openejb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (TOMEE-2234) BMP finder returning more than 256 entities MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Thomas Lien created TOMEE-2234: ---------------------------------- Summary: 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: 7.0.5, 1.7.3 Reporter: Thomas Lien Running into a situation where calling an EJB2 BMP finder method that retur= ns more than 256 entities causes subsequent finder calls in the same sessio= nbean transaction to fail. =C2=A0 {code:java} BigFinderHome bigFinderHome =3D (BigFinderHome)lookup("BigFinderHome"); LittleFinderHome littleFinderHome =3D (LittleFinderHome)lookup("LittleFinde= rHome"); for (int i =3D 1; i < 300; ++i) { =C2=A0 // 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! =C2=A0 bigFinderHome.findN(i); Collection littleList =3D littleFinderHome.findAll(); for (Object obj: littleList) { StringBuilder msg =3D new StringBuilder(); if (!(obj instanceof LittleFinder)) { msg.append("Failed with " + i + " records. LittleFinder Remote is act= ually " + obj.getClass().getName() + " Implemented interfaces " + Arrays.to= String(obj.getClass().getInterfaces())); if (obj instanceof EJBObject) { Object pk =3D ((EJBObject)obj).getPrimaryKey(); msg.append(" Primary key value is " + pk); } throw new EJBException(msg.toString()); } } {code} =C2=A0 I can replicate this 100% of the time by deploying the attached ztest.ear a= pplication 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 ha= ve the error. The error output of my test is as follows 09-07 12:25:13=C2=A0[SEVERE]=C2=A0EjbTransactionUtil.handleSystemException:= Failed with 257 records. LittleFinder Remote is actually com.sun.proxy.$Pr= oxy142 Implemented interfaces=C2=A0[interface ztest.BigFinder, interface ja= va.io.Serializable, interface org.apache.openejb.core.ivm.IntraVmProxy]=C2= =A0Primary key value is 1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)