...
The <SimpleManagedConnection>
element defines a JDBC connection using a custom syntax that supports some limited options. It is aimed only at getting users people started with database connections while testing the rest of the functionality.
...
We suggest the use of externally defined connections using the <
the <BeanManagedConnection> element to fully tailor a suitable connection pool.
Reference
Localtabgroupexpand | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Localtab live |
| |||||||||||||||||||
|
Examples
Code Block | ||
---|---|---|
| ||
<SimpleManagedConnection jdbcDriver="org.hsqldb.jdbc.JDBCDriver" jdbcURL="jdbc:hsqldb:mem:RDBMSDataConnectorStore" jdbcUserName="jdbcUser" jdbcPassword="Whatever" /> |
This is exactly equivalent to defining a <
BeanManagedConnection
>
<BeanManagedConnection>
referring to a Spring bean with this configuration.
...
:
Code Block | ||
---|---|---|
| ||
<bean id="simpleDataConnector" class="org.apache.commons.dbcp2.BasicDataSource" p:driverClassName="org.hsqldb.jdbc.JDBCDriver" p:url="jdbc:hsqldb:mem:RDBMSDataConnectorStore" p:username="jdbcUser" p:password="Whatever" p:maxTotal="20" p:maxIdle="5" p:maxWaitMillis="5000" /> |
...