Data sources can reduce the number of database connection objects created to improve system performance.
There are various data source configuration templates under c: \ jboss-5.0.0.GA \ docs \ examples \ JCA.
The file name for the data source contains-ds, such as the mysql-ds.xml.
Take MYSQL as an example:
1. modify data source parameters.
The number of available connections to the database can be configured in the mysql-ds.xml:
<Min-pool-size> 0 </min-pool-size>
<Max-pool-size> 20 </max-pool-size>
2. Data Source deployment.
The connection driver mysql-connector-java-5.0.4-bin.jar of MySQL is copied to the C: \ jboss-5.0.0.GA \ Server \ Default \ Lib of JBoss.
3. Publish the data source.
Copy the mysql-ds.xml to c: \ jboss-5.0.0.GA \ Server \ Default \ deploy to complete the release.
The following figure is displayed on the JBoss console:
Bound connectionmanager 'jboss. JCA: service = performancebinding, name = ITDS 'to JNDI name 'java: ITDS '.
Note: Under JBoss, the data source can be dynamically released, so we modify the parameters in the mysql-ds.xml and save it, JBoss can deploy it.