I'm also having the same problem with findAll() where if there are rows in a table, the collection will contain the first row of data 10 times. Not all 10 rows of data (or references to beans containing the 10 rows of data.) After further investigation of the Lookup bean (LookupBean.java - associated with Lookup.java), ejbLoad() is only called once. Is this correct? Shouldn't ejbLoad() be called for every bean found? No beans were in memory at the time of the initial lookup of the data records. Thanks. -----Original Message----- From: Hardy, Patrick, DDI - Garden City [mailto:[EMAIL PROTECTED]] Sent: Friday, March 09, 2001 08:17 AM To: 'JBoss-User' Subject: RE: [jBoss-User] Duplicate bean results in findByXX execution pro blem. Source code: Entity bean home interface snippet (LookupHome.java): public Collection findByClub_Id (String club_id) throws FinderException, RemoteException; Entity bean remote interface snippet (Lookup.java): public LookupData getSourceKeyData() throws RemoteException; Stateless session bean snippet (EditorBean.java): . . . Iterator iterator = lookupHome.findByClub_Id (club_id).iterator(); while (iterator.hasNext()) { Lookup l = (Lookup)iterator.next(); System.err.println ("source key: " + l.getSourceKeyData().getSourceKey()); 2 beans matched the criteria. Results of the println: source key: 017_06_cn_06_719_089K source key: 017_06_cn_06_719_089K What *should have* printed: source key: 017_06_cn_06_719_089K source key: 017_06_cn_06_719_089L Editor bean does a findByXX() with a given club identification and returns a Collection of remote references to matching beans (correct?). Using an iterator, run through the list of remote references and pull out the data. Is there something I'm doing wrong? I am using JDK 1.3 & JBoss 2.0 FINAL. Thanks. -----Original Message----- From: David Castro Diephouse [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 19:23 PM To: JBoss-User Subject: Re: [jBoss-User] Duplicate bean results in findByXX execution pro blem. That's strange. How are you determining the identity of the returned beans? Post the code + results... "Hardy, Patrick, DDI - Garden City" wrote: > Hello, > > I just read the section > http://www.jboss.org/newsite/documentation/jawsxml_howto.html#finders on the > JBoss site and it says that: > > "for each of the cmp-fields of your bean, findByXX(YY fieldValue), where XX > is the name of the cmp-field (NOT case-sensitive) and YY its class, will > return a Collection of all the beans with the right value in this field." > > My finder is finding the correct number of beans. However, when I go through > the list of beans in my collection, the collection consists of the first > bean, n number of times. If I find 5 beans, the first bean will be in the > collection 5 times, and not all 5 beans. > > Can anyone explain to me why I'm having this problem? I don't think it's > necessary to define a WHERE clause. > > Thanks. > > -- > -------------------------------------------------------------- > To subscribe: [EMAIL PROTECTED] > To unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- This message (including any attachments) contains confidential, proprietary or privileged information intended for a specific purpose and individual(s), and is protected by law. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. Any unauthorized disclosure, copying or distribution of any part of this message, or the taking of any unauthorized action based on it, is strictly prohibited. -- -------------------------------------------------------------- To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] -- -------------------------------------------------------------- To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] -- -------------------------------------------------------------- To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED]
RE: [jBoss-User] Duplicate bean results in findByXX executionpro blem.
Hardy, Patrick, DDI - Garden City Fri, 09 Mar 2001 06:21:21 -0800
- Re: [jBoss-User] Duplicate bean results ... David Castro Diephouse
- RE: [jBoss-User] Duplicate bean res... Hardy, Patrick, DDI - Garden City
- Hardy, Patrick, DDI - Garden City
