• 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
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!