Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dependency injection question?

 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many tutorials on the internet says that a client can get a reference to bean's business interface through dependency injection. Most of the tutorials provides a code snippet like the following :


@EJB Cart cart1;


My question is that in a standard java application, how does the runtime know the parameters of the EJB server, such as its locatipn (IP Address). I think there should some more required data to provide.

Can somebody please provide me with a more comprehensive example ??

Thanks in advance
 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DI - takes place in the following - ejb, servlet and application client...

Not for a normal stand alone java client.

P.S: Application client != standalone java client.

Regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic