-
1. Re: How can I improve the CMP's client's speed?
juha Dec 7, 2003 6:46 AM (in response to xf_fong)Start by building a session facade and value objects. These are well known patterns in EJB programming. You should be able to find plenty of resources on the web on these.
It is likely you're getting bogged down by excessive remote invocations. Don't know why your Oracle would be busy with such a simple query.
-- Juha -
2. Re: How can I improve the CMP's client's speed?
xf_fong Dec 7, 2003 9:13 PM (in response to xf_fong)Do you mean I ought to use session bean to do this kind of job(select * from ....)? I know perhaps that will perform better!
But I want to know can I cache the whole table's rows into JBoss?Or can I only cache 1000 rows of a table which has 10000 rows?
Thanks! -
3. Re: How can I improve the CMP's client's speed?
juha Dec 8, 2003 7:32 AM (in response to xf_fong)Yes you can cache a whole table if you have enough memory. It also depends whether you have an exclusive access to the database whether caching a whole table really makes sense or not.
-- Juha -
4. Re: How can I improve the CMP's client's speed?
xf_fong Dec 8, 2003 8:09 AM (in response to xf_fong)Thanks for your answer!
But I want to know how to cache the table?I only know perhaps the <instance-cache> tag will be the clue,but I don't find a good sample! Can you give me some links?
Another thing confused me is when I use findAll() to do another test. In this case, I modified the Beans setEntityContext as followed:
==================================
public void setEntityContext(EntityContext ctx){
this.context = ctx;
System.out.println("setEntityContext exec! -- " + this.context.toString());
}
==================================
I found when I start 5 clients, the memory consumed will 5 times as 1 client. And will also produce 5 different context. Is that mean 5 clients will produce 5 EJB Object instances and 5 Enterprise Bean instances? Or other kind of understanding?
(I think EJB Object instance is from my Component Interface: XXX extends EJBObject and Enterprise Bean instance is from my EntityBean: XXXBean implements EntityBean. Am I right?)