• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic