• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

JNDI and DI

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your post.
 
She's brilliant. She can see what can be and is not limited to what is. And she knows this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic