Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

DI Spring question

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I'm relatively new to the DI subject, I have read that you can inject directly objects and values through configuring a xml file, and this injection takes place during initialization, but what happens with the direct injection on the fly? how spring handles that?.. is it possible?.. thanks.

Regards.
 
author
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

You can use XML, or Java code or any of a number of different mechanisms to configure the injector. Once configured, the injector takes care of calling "new" for you and providing your objects with dependencies.

I would suggest the green paper on this website as a good starting point:
http://manning.com/prasanna

Dhanji.
 
Serch Hdez
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much as an expert in this, I'd like to ask you, what would be the best or the most powerful dependency injection-design pattern combination we could use?...

Regards.
 
Dhanji Prasanna
author
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I would suggest that is specific to what kind of application you are building. You should check out the green paper linked above as a good introductory bit of reading.
reply
    Bookmark Topic Watch Topic
  • New Topic