• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

JNDI and DI  RSS feed

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Could any one illustrate me the difference between JNDI and Dependency Injection. What was the advantage of using Dependency Injection over JNDI.


And also How does a client calling a stateless session bean through JNDI differs from client calling the static classes.


Thanks,
Shyam.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

vShyam Sundar wrote:
Could any one illustrate me the difference between JNDI and Dependency Injection. What was the advantage of using Dependency Injection over JNDI.


JNDI and dependency injection are two different things. Agreed that in Java EE most of the times the injected values come from JNDI, but that's not the only place where the injected values need to come from. Dependency injection is independent of JNDI. This journal article by one of the JavaRanch Sheriffs explains dependency injection well.

 
vShyam Sundar
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your post.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!