• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Should DAO object creation in application be replaced with Spring IOC code?Is it advisable way?

 
Ranch Hand
Posts: 2637
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a Struts-Hibernate application where I tried to introduce spring IOC and it worked fine. I want to know whether this way of using this is advisable? This is what I did: The DAO object in struts action class which was created with new operator , I replaced this with just creating reference and creating a Settor for it. I defined this in applicationcontext.xml. This way DAO is getting set using Spring IOC. My functionality is working fine but is it advisable to use Spring IOC here as I had done?
thanks
reply
    Bookmark Topic Watch Topic
  • New Topic