It is faster. I tried it in response to danch's message early in the thread.
Thus I have the same question (which no one commented on): "Time ~1200ms is a lot better then the original 2200, but can this still be acceptable for reading ~10 fields from 750ejbs that are 100% cached?" Here is the email in this thread reporting the results: >That makes sense for the weird timing observations. > >I tried the value object pattern with a local ejbHome method. Utilizing a >finder this reduced my time from ~2200ms to ~1600, then i tried an ejbSelect >which took it down to ~1400ms. > >Then i tried your suggestion (bulk getter) and was able to get the time to >about ~1200ms. A lot better then the original 2200, but can this still be >acceptable for reading ~10 fields from 750ejbs that are 100% cached? > >Also, the first time though (uncached), is still very long >11,000 ms for >the exact same code and data...course a bit of this is creating db pool >connections. > >.peter -----Original Message----- From: Dain Sundstrom [mailto:dain@;daingroup.com] Sent: Monday, November 04, 2002 5:10 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Entity Bean Performance Tuning Help Luttrell, Peter wrote: > Bill also suggested that it was my code, which i don't think is the case. I > could be wrong ~ can anyone suggest how i can optimize this constructor: > > public MyValueObject(SomeLocalInterface ejb){ > > name = ejb.getName(); > id = ejb.getId(); > someOtherField = ejb.getSomeOtherField(); > } > > There are about 10 fields or so. I did double check and realize that one of > them is a field on a relationship, which may be the source of the problem. You are doing 10 invocations through the ejb layers. The code will be way more efficient if you put the value object creation code inside the entity bean. For example public abstract class MyEntityBean extends EJBObject { public MyValueObject getValueObject() { MyValueObject valueObject = new MyValueObject(); valueObject.setName(getName()); valueObject.setId(getId()); valueObject.setSomeOtherField(getSomeOtherField()); } } The important difference is the loading of the value object gets all of the data from the ejb using calls inside of the bean instance and specifically the calls don't travel over a Remote or Local interface. This means there is no code interpositioned. -dain ------------------------------------------------------- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.com _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. ------------------------------------------------------- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.com _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user