You might also want to look into using 'group accessors' to grab all of 
the data out of the entity in one big chunk. This combined with a 
session bean wrapper would be the best bet.

-danch

Frank Morton wrote:

> There are 16 in the Collection. Ranges from 35 to 60 ms for each
> call to getId(). Calls for other fields from the same instance take
> a similar time. It is like it is going back to the database for each
> hit. I'll be messing with different commit options as "danch"
> suggested among other things.
> 
> Exact same behavior if instead of findAll() to get a Collection, I
> use findByPrimaryKey() for one object.
> 
> I appreciate the help.
> 
> Frank
> 
> 
> 
>>How many entities are in the collection being returned from findAll()?
>>
>>James Hicks
>>
>>-----Original Message-----
>>From: Frank Morton [mailto:[EMAIL PROTECTED]]
>>Sent: Thursday, October 25, 2001 10:47 AM
>>To: Fred Loney; [EMAIL PROTECTED]
>>Subject: Re: [JBoss-user] performance problem
>>
>>
>>I know it isn't that hit. See my later email "performance problem
>>simplified."
>>
>>
>>
>>>If the performance hit comes in an initial JSP call, then it is the
>>>one-time JSP page compilation overhead. This is not a problem for a live
>>>site. Subsequent page fetches are what's important.
>>>
>>>Fred Loney
>>>Spirited Software, Inc.
>>>www.spiritedsw.com
>>>
>>>
>>>----- Original Message -----
>>>From: "Frank Morton" <[EMAIL PROTECTED]>
>>>To: "Fred Loney" <[EMAIL PROTECTED]>;
>>><[EMAIL PROTECTED]>
>>>Sent: Thursday, October 25, 2001 5:25 AM
>>>Subject: Re: [JBoss-user] performance problem
>>>
>>>
>>>
>>>>>What is Profile? An EJBObject? Where did the profile object come
>>>>>
>>>from?
>>>
>>>>Profile is an EJBObject. It was instantiated in the first place with
>>>>the findAll() finder method. I stuff the resulting Collection in
>>>>the session (is this the best way to do it?) which is then retrieved
>>>>from the session by the jsp. It is on the jsp that accessing the
>>>>fields is incredibly slow.
>>>>
>>>>
>>>>>ejbPassivate() is called at the discretion of the JBoss container,
>>>>>
>>>not
>>>
>>>>>necessarily when a task is completed. An EB is passivated when it is
>>>>>swapped out of the instance pool. If there are only a few EBs, it is
>>>>>unlikely to be passivated right away.
>>>>>
>>>>>
>>>>>>Still a newbie, but making progress thanks to the list....
>>>>>>
>>>>>>I'm using a servlet that processes forms, puts the necessary
>>>>>>results in the session and redirects to a jsp page. Working
>>>>>>pretty well, but the display of the jsp page is very slow.
>>>>>>
>>>>>>Poking around, I found out something that probably has an
>>>>>>easy resolution, but I don't know what it is.
>>>>>>
>>>>>>In the session is a Collection of Profile objects.  Boiling it
>>>>>>down, the assignment to the "homeId" in the code below can
>>>>>>take as long as a full second! What is going on here? Given
>>>>>>a Collection called "nameList" and an int with the size of the
>>>>>>list named "nameListSize":
>>>>>>
>>>>>>for(int k=0;k<nameListSize;++k) {
>>>>>>     Long homeId = profile.getId();  // takes one full second!
>>>>>>}
>>>>>>
>>>>>>The "id" is the primary key for the CMP entity bean of
>>>>>>type "Long." I assume since the servlet is "finished" that
>>>>>>passivate() is being called, so accessing the bean is
>>>>>>causing it to not only go back to the database, but to
>>>>>>do other stuff, too.
>>>>>>
>>>>>>What do I do about this? Thanks.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>_______________________________________________
>>>>>>JBoss-user mailing list
>>>>>>[EMAIL PROTECTED]
>>>>>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>>>>>
>>>>>>
>>>>>
>>>>>_______________________________________________
>>>>>JBoss-user mailing list
>>>>>[EMAIL PROTECTED]
>>>>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>>>>
>>>>>
>>>>>
>>>>
>>>>_______________________________________________
>>>>JBoss-user mailing list
>>>>[EMAIL PROTECTED]
>>>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>>>
>>>>
>>>
>>
>>_______________________________________________
>>JBoss-user mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>
>>
>>
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to