Dear Rodrigues,
 
I think that it's a great idea, but it's really not going to scale well under the J2EE model. The reason being is that you don't actually get a session bean per se from the "Home" reference, you only get a stub.  The actual SessionBean instance is established "somewhere out there" in the distributed world of the JNDI.  If you have, say, 3 EJB machines, any one of them can have your actual SessionBean that will execute a remote method you called from the client.  But you really do not care which one it was, and that is the beauty of J2EE.  You can scale your system "transparently" just by adding more machines on the network.
 
Your cache model will work only if you know which machine you're going to end up on.  True, you're "saving" a remote call to the Home reference, but you lose scalability. A more "kosher" way to do this, would be to cache all the Home references instead, which I think is already done by the context on many J2EE servers.
 
There is a nice discussion thread about this, titled "Saving JNDI lookups by caching home references"
 
 
Best regards,
 
Greg
 
P.S. I doubt that remote calls to session beans are the source of the slow response of the system.  A better way to speed up the response is to concentrate on having a single remote call to a session bean facade per transaction, if possible.  There is always a fair overhead for a distributed system.  The fastest query would be a SQLPlus call to a stored procedure, performed on the same machine as the DB.  Scalability for 100+ users is the chief reason for adding a distributed J2EE network on top of your DB.  If you don't need scalability, just put it all on the same machine for the fastest response if you have <10 users, Client-Server for <100 users, J2EE for anything >100.
 
G.
 
 
 
-----Original Message-----
From: ryo [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 11:25 AM
To: jdjlist
Subject: [jdjlist] RE : RE: J2EE session bean

In fact i want to reduce lookup on the server for all stateless session and have one point where my clients goes to search the sessions.

One lookup on my client and get all overs session by this session fa�ade who have made the lookups only once.

I think that it's reduce the time of getting session.

Client

One lookup for one session and get 10 session from this session

 

Server

One session establishing 10 different sessions instance an set available for the clients.

 

What do think?

 

---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk To unsubscribe from all mailing lists, click:
http://sys-con.com/[EMAIL PROTECTED]

Reply via email to