Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a web application which only exposes web services. The web services are just a simple bridge for making stored procedure calls to the database.

Currently I plan using Spring JDBC, but how do I inject the DataSource if I have no main function where instantiate it?

My guess is the answer is in some web.xml configuration or applicationContext.xml itself...

I been trying to find a post on the web for this, but no luck so far. Lots of good info, but not exactly what I am shooting for.

Can anyone shine?

thanks
Posted

1 solution

You can use Spring AOP module, you can inject your piece of code any where in the program.

like :
a) After b) before c) around
inside your code as per your requirement


check this links

http://static.springsource.org/spring/docs/1.2.x/reference/aop.html[^]

http://www.javabeat.net/articles/51-introduction-to-springs-aspect-oriented-programminga-1.html[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900