This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Regarding JNDI doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "Regarding JNDI doubt" Watch "Regarding JNDI doubt" New topic
Author

Regarding JNDI doubt

Sudhakar Reddy Kurakula
Ranch Hand

Joined: Aug 19, 2006
Posts: 42
Hi,

I have binded one object in Jdni.But now two clients want to access that resource at a time using lookup() method.Now both clients will work on the same object or on different objects.

Cheers
Sudhakar.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26192
    
  66

Sudhakar,
They would be working with the same object because only one copy was bound to the JNDI.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4967

Of course, the object bound to JNDI might be a factory, so they might be working with a factory, that actually produces multiple instances of the thing the client really wants.

Like, a DataSource is bound to JNDI. People access a DataSource, but not for a DataSource, but for a database connection. So, even if everyone gets the same datasource, the clients will be getting a different connection from the pool.

Okay, the connection pool presents all sorts of sharing issues as well. But you know what I mean.

-Cameron McKenzie


Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Regarding JNDI doubt
 
Similar Threads
CORBA clients connects with Java thru ?
Entity bean instance accessible to multiple client
when the home object will be created??
JWeb+ Question ID :996245849311
Locking issues