Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • I have changed datasource to <bean id="myDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" > <property name="url" value="jdbc:mysql://localhost:3306/test_amXX"/> <property name="username" value="root"/> <property name="password" value=""/> But i get a strange error..... THERE IS NO USER BY NAME 'sa' IN XML OR IN MYSQL.... java.sql.SQLException: Access denied for user 'sa'@'localhost' (using password: NO) Commented Nov 23, 2013 at 12:21
  • using org.springframework.jdbc.datasource.DriverManagerDataSource has worked.. But now i am not able to use DBCP. Is there a way to use pooling still in datasource??? Commented Nov 23, 2013 at 19:56
  • what do you mean by polling? Commented Nov 25, 2013 at 16:26
  • i mean db 'connection' pooling service provided by DBCP. DBCP maintains a pool of connections to db and provide them when required instead of we creating a new connection when required.. This service is automatically provided when we use datasource from DBCP and is popular. we can set the max number of connections property in DBCP datasource. But in this case, i guess we wont get that facility. Commented Nov 27, 2013 at 7:37
  • Then you should have look at commons-dbcp (commons.apache.org/proper/commons-dbcp), which provides a good DataSource implementation with a lot of pooling options Commented Nov 28, 2013 at 9:21