📄 ch03s06.html
字号:
</p></div><div class="section"><a name="resource-jdbc-wrappers"></a><div class="titlepage"><div><h3 class="title"><a name="resource-jdbc-wrappers"></a>Configuring the jdbc wrapper resource adapters</h3></div></div><p>As for any resource adapter, all the resource adapter specific configuration must be done with the ManagedConnectionFactoryProperties entry. Let's consider the contents separately for the two wrappers. </p><div class="section"><a name="resource-jdbc-wrappers-local"></a><div class="titlepage"><div><h4 class="title"><a name="resource-jdbc-wrappers-local"></a>LocalTransaction wrapper for jdbc 1 (non-xa) drivers</h4></div></div><p>Here are the available properties to configure.
<div class="itemizedlist"><ul><li><p><a name="d0e1195"></a>UserName (String). The username used to create JDBC connections. This can also be supplied via the PrincipalMapping class, for instance the ManyToOnePrincipalMapping can provide a "constant" user/password.</p></li><li><p><a name="d0e1198"></a>Password (String). The default password used to create a JDBC connection. As for UserName, this can be supplied by the PrincipalMapping.</p></li><li><p><a name="d0e1201"></a>ConnectionURL (String). The jdbc URL used to create jdbc connections from java.sql.Driver.</p></li><li><p><a name="d0e1204"></a>Driver (String). The class name of the JDBC driver that handles this jdbc URL. Note that it is preferred to use this property rather than the JDBCProvider previously required.</p></li><li><p><a name="d0e1207"></a>TransactionIsolation (String). The string name of the desired transaction isolation for the connections. The allowed strings are the names of the static Connection members, TRANSACTION_SERIALIZABLE, TRANSACTION_REPEATABLE_READ, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_NONE. Note that not all values are supported by all databases. Alternatively, you may use (the string representation of) the integer value for the transaction isolation level. This may be useful if a driver supports a nonstandard isolation level.</p></li><li><p><a name="d0e1210"></a>AutoCommit (String). You are strongly advised not to set this. The autocommit property is set false by default for connections obtained from this adapter wrapper. This property is included only to provide emulation of the obsolete JDBCDataSourceLoader which provided no transaction support and left autocommit true.</p></li></ul></div>
</p></div><div class="section"><a name="resource-jdbc-wrappers-xa"></a><div class="titlepage"><div><h4 class="title"><a name="resource-jdbc-wrappers-xa"></a>XA Transaction wrapper for jdbc 2 XADataSource drivers</h4></div></div><p>Here are the available properties to configure.
<div class="itemizedlist"><ul><li><p><a name="d0e1220"></a>XADataSourceClass (String). The class name of the underlying XADataSource driver. This specifies what driver is being wrapped.</p></li><li><p><a name="d0e1223"></a>XADataSourceProperties (String) These are the properties needed to configure the underlying XADataSource. They must be in the format of name=value pairs separated by semicolons, with no spaces. For example, name1=value1;name2=value2;name3=value3. The most typical use for this is the url for the database instance you are connecting to.</p></li><li><p><a name="d0e1226"></a>UserName (String). The username used to create JDBC connections. This can also be supplied via the PrincipalMapping class, for instance the ManyToOnePrincipalMapping can provide a "constant" user/password.</p></li><li><p><a name="d0e1229"></a>Password (String). The default password used to create a JDBC connection. As for UserName, this can be supplied by the PrincipalMapping.</p></li><li><p><a name="d0e1232"></a>TransactionIsolation (String). The string name of the desired transaction isolation for the connections. The allowed strings are the names of the static Connection members, TRANSACTION_SERIALIZABLE, TRANSACTION_REPEATABLE_READ, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_NONE. Note that not all values are supported by all databases. Alternatively, you may use (the string representation of) the integer value for the transaction isolation level. This may be useful if a driver supports a nonstandard isolation level.</p></li></ul></div>
</p></div></div></div><table border="0" cellpadding="0" cellspacing="0" height="65"><tr height="65"><td rowspan="2"><img src="gbar.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/gbar.gif" width="432" height="79"></td><td rowspan="2" background="gbar.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/gbar.gif" width="100%" align="right" valign="top"><a href="index.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/index.html"><img src="doc.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/doc.gif" border="0"></a><a href="ch03.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch03.html"><img src="toc.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/toc.gif" border="0"></a><a href="ch03.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch03.html"><img src="prev.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/prev.gif" border="0"></a><a href="ch03s12.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch03s12.html"><img src="next.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/next.gif" border="0"></a></td></tr><tr></tr></table></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -