File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Other Application Frameworks
Spring Question: How to realize IOC in stand alone programs?
Joined: Jul 10, 2001
Aug 14, 2008 15:02:00
I have a stand alone program that loads application context and then fetches the jdbctemplate using datasource defined in the context file in the main program.
I do have other DAO classes defined in the application context, but when they are called i am not able to get access to the Jdbctemplate, unless i pass it into them.
Here is my example config for the DAO does say it is 'datasource' driven:
<bean id="requestData" class="com.x.y.z.dao.RequestDAO">
<property name="dataSource" ref="dataSource" />
Do i need to make the DAOs applicationcontext aware or something similar??
[ August 14, 2008: Message edited by: Kishore Dandu ]
It is sorta covered in the
JavaRanch Style Guide
subject: Spring Question: How to realize IOC in stand alone programs?
Unique issue with Spring-WebServices-JDBC
JNDI Lookup of Datasource
What else is Spring good for?
Spring sample applications - Need Help
Implementing Spring DAO concept in Struts MVC
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014