I have a bit of an issue.
I am running an MDP in websphere consuming incoming MQ messages.
I load an instance of applicationContext using ContextLoaderListener in my web.xml
I subsequently need to access a dataSource from within the loaded applicationContext to do this I was using ClassPathXmlApplicationContext. This, I've discovered will load another applicationContext into memory which is a bad thing as this won't shutdown when I close the application - it means I need to bounce the cluster it is on to stop it.
I have trawled around loads trying to find a way to access the initial applicationContext dataSource I loaded but have been unable to find a method to do this. Can anyone help/point me to a thread and/or javadocs to explain what I need to do.
As further explanation I require the datasource to create the jdbcTemplate to load the message into a database.
Thanks


Reply With Quote