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?

 

 

 

-----Message d'origine-----
De : Greg Nudelman [mailto:[EMAIL PROTECTED]
Envoy� : mercre
di 15 octobre 2003 18:32
� : jdjlist
Objet : [jdjlist] RE: J2EE session bean

 

Hmmm.... I think it is certainly possible, however, the whole point of J2EE is that you don't need to do this nitty-gritty details.  Instead you should be able to use the admin utility or xml config files to set up how many session beans you want in your pool.  Pool is created automatically, and to get an instance over the distributed network, you simply have to get a Home stub from context and ask it to create a remote instance of the bean you want.  The Home object will figure out if you already have some free objects in the pool, or whether to create more, etc.  You don't need to worry, the J2EE framework should take care of it:

 

        CreateXHome createXHome = (CreateXHome) context.lookup("Your App.CreateXHome");
        CreateX createX = createXHome.create();  //get from a pool, or make a new one
        createX.createX(someData); //call a remote method on a session bean

 

Greg

-----Original Message-----
From: Sebastien RODRIGUES [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 14, 2003 7:17 AM
To: jdjlist
Subject: [jdjlist] J2EE session bean

Hi,

It is possible to connect a client to a session bean SessionBeanFactory containing a pool of the overs session.

and giving this method:

private Hashmap map;

SessionBean getSession(String nameToLookup)

{

if(map.contains(nameToLookup)) return map.get(nameToLookup);

//crete new connection to the bean session using a service locator

map.put(nameToLookup,mynewsession)

return mynewsession;

}

Regards.

--- 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]

---
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]

---
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