wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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
Author

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]http://javacollectionsnotes.blogspot.com[/url] | [url]http://omkar-myscjpexp.blogspot.com[/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

Herman
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: accessing beans, declared in spring-config.xml
 
Similar Threads
Looking for advice on configuring a new project using Spring and Hibernate.
Bean definition found but not found
Spring - Multiple IoC Containers with Singleton Bean in a JVM
Help needed to set up Spring IOC in a web application
import in spring xml