Meaningless Drivel is fun!
The moose likes Other Application Frameworks and the fly likes accessing beans, declared in spring-config.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "accessing beans, declared in spring-config.xml" Watch "accessing beans, declared in spring-config.xml" New topic

accessing beans, declared in spring-config.xml

omkar patkar
Ranch Hand

Joined: Aug 25, 2005
Posts: 231
Hello Guys,

I am using Struts 1.2.8 and spring2.0. I declare my beans in the spring-config.xml file which is loaded into the memory when the server is started. Now if in action class i want to access a bean already instantiated in the memory when the xml file was loaded. Can any one tell me which class in spring i can use for this purpose ?

Many thanks in advance.
mkar Patkar

Thanks and Regards
Omkar Patkar (SCJP 1.4)[url][/url] | [url][/url]
Herman Schelti
Ranch Hand

Joined: Jul 17, 2006
Posts: 387
hi Omkar,

a small example from the book Pro Spring (chapter 19)

You won't even need this if you declare your Struts Actions as Spring Beans

I agree. Here's the link:
subject: accessing beans, declared in spring-config.xml
It's not a secret anymore!