• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How to inject bean references using Spring Framework?

 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi , please take some time to understand the question .

we are having a very Tightly coupled code which was already developed since 2004 ,so we decided to split into seperetae Beans (classes) , and each Bean performing its Own operation , we are using Spring for this .

In our Applcation , we want to represent each module having its own XML file , something similar as shown say it as FirstModule.xml

As you can see from the xml file is that , each Bean id has its own sequence of operations defined .

Now my question is , from the Dao Layer , depending upon the request , i want to call a sepearte Bean id (For example InsertData) , so taht it will execute a series of operations as mentioned in the xml file ??

Is it possible to achieve this using Spring 3 Framework ?? Please sugegst , Thanks .
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is not a valid Spring xml configuration file.


That is injecting bean references using Spring via Constructor arg dependency injection. You would useā€¦



to do dependency injection via Setter methods where MarkServiceImpl has two setter methods.

setRef1(BeanReference reference1)
setRef2(BeanReference reference2)

Mark
 
How do they get the deer to cross at the signs? Or to read this tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic