• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding JNDI doubt

 
Sudhakar Reddy Kurakula
Ranch Hand
Posts: 42
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 33671
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sudhakar,
They would be working with the same object because only one copy was bound to the JNDI.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic