posted 15 years ago
Hi Guys,
Just a quick Spring Framework Bean question. I want to configure the application context to initialise a bean on start up.
Bean extends SimpleJdbcDaoSupport, it has a connect method defined which is called from the beans constructor.
The connect method basically does some sql querys, then perfroms some function based on results.
Scenario is:
Deploy the web app;
On start up application context see's the bean should be initialised,
Initialised the bean, which then perfroms the connect method.
This is my application context which points to the bean:
<bean id = "sessionManager" class = "com.example.beans.SessionManager">
<property name = "dataSource" ref = "dataSource"/>
</bean>
I have tried addind auto-wireing tags and init-methods to make it work, but so far i have not successfully made the bean call the connect method on start up. The app will basically deploy and then that would be it.
Any help, im sure its prob something small and easy.
best
Mark