Thanks looks exactly what i was looking for. 
Any ideas on integrating spring to legacy code without
code rewrite ?
Existing Dao's have something like
Code:
public static List getUsers() throws Exception {
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;
String sql = " select * from usertable" ;
List userList = new ArrrayList();
User user = null;
try{
con = ds.getConnection();
ps = con.prepareStatement(sql);
rs = ps.executeQuery();
while(rs.next()){
user = new User();
// set details to User Object
userList.add(user);
}
}
finally{
closeResultSet(rs);
closePreparedStatement(ps);
closeConnection(con);
}
return userList;
}