Can someone tell me or point me to a document/tutorial that explains how to use connection pooling in Spring?
相关问题
- java.lang.IllegalArgumentException: Cannot set to
- Spring Data MongoDB - lazy access to some fields
- Declaring an explict object dependency in Spring
- Decoding body parameters with Spring
- Spring Integration - Inbound file endpoint. How to
相关文章
- java JDK动态代理和cglib动态代理最后获取的代理对象都为null的问题
- org.xml.sax.SAXParseException; lineNumber: 7; colu
- SpringMVC如何把File封装到Map中?
- Spring: controller inheritance using @Controller a
- How to load @Configuration classes from separate J
- Java spring framework - how to set content type?
- Java/Spring MVC: provide request context to child
- Spring 5 Web Reactive - Hot Publishing - How to us
Spring doesn't support inbuilt pooling. You should use a third party pool as mentioned above. DBCP and c3p0 both work like a charm with spring. All you need to do is when defining a datasource in your context.xml, just use DBCP to define it.
You might use a pooled datasource from the jdbc driver. E.g. in oracles library there is one:
AFAIK Spring doesn't include a pooled DataSource... you can use Apache DBCP for that, if you need a connection pool in a J2SE application. For container-hosted apps, you should configure a DataSource in the container and use it from your app.