JBoss数据源配置

1. MySql

<?xml version="1.0" encoding="UTF-8" ?>

<datasource>
	<local-tx-datasource>
		<jndi-name>stuMySqlDS</jndi-name>
		<connection-url>
			jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&amp;characterEncoding=GB2312
		</connection-url>
		<driver-class>com.mysql.jdbc.Driver</driver-class>
		<user-name>root</user-name>
		<password>admin</password>
		<exception-sorter-class-name>
			org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
		</exception-sorter-class-name>
		<min-pool-size>3</min-pool-size>
		<max-pool-size>32</max-pool-size>
		<!-- 抛出异常前最大等待时间 -->
		<blocking-timeout-millis>60000</blocking-timeout-millis>
		<!-- 关闭连接前最大空闲时间 -->
		<idel-timeout-minutes>5</idel-timeout-minutes>

		<metadata>mySQL</metadata>
	</local-tx-datasource>
</datasource>



2. MS SqlServer 2005
<?xml version="1.0" encoding="UTF-8" ?>

<datasource>
	<local-tx-datasource>
		<jndi-name>stuSqlServerDS</jndi-name>
		<connection-url>
			jdbc:sqlserver://127.0.0.1:1433;DatabaseName=test
		</connection-url>
		<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
		<user-name>sa</user-name>
		<password>sa</password>

		<metadata>MS SQLSERVER2005</metadata>
	</local-tx-datasource>
</datasource>



2. Oracle9i
<?xml version="1.0" encoding="UTF-8" ?>

<datasource>
	<local-tx-datasource>
		<jndi-name>stuOracleDS</jndi-name>
		<connection-url>
			jdbc:oracle:thin:@127.0.0.1:1521:fantasy
		</connection-url>
		<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
		<user-name>scott</user-name>
		<password>tiger</password>

		<metadata>Oracle9i</metadata>
	</local-tx-datasource>
</datasource>

你可能感兴趣的:(oracle,mysql,xml,jboss,jdbc)