0
在每個通過JNDI執行查詢之前,我有一個非常有趣的需求來添加註釋字符串(如/*Query Hint VPOD100*/
)。我們可以在每次查詢之前修改查詢和評論(或查詢提示)嗎?如何配置在JNDI查詢之前添加註釋行
請找到我在jboss-as-7.2.0.Final中使用的JNDI配置。
<datasource jndi-name="java:/avalon-ds" pool-name="avalon-ds" enabled="true" use-ccm="false">
<connection-url>jdbc:teradata://env.corp.xyz.com/charset=UTF8,DBC_PORT=1025</connection-url>
<driver-class>com.teradata.jdbc.TeraDriver</driver-class>
<driver>TeradataDriver</driver>
<new-connection-sql>select 1</new-connection-sql>
<pool>
<min-pool-size>2</min-pool-size>
<max-pool-size>4</max-pool-size>
<prefill>true</prefill>
<use-strict-min>true</use-strict-min>
<flush-strategy>IdleConnections</flush-strategy>
</pool>
<security>
<user-name>user</user-name>
<password>password</password>
</security>
<validation>
<check-valid-connection-sql>select 1</check-valid-connection-sql>
<validate-on-match>true</validate-on-match>
<background-validation>true</background-validation>
<background-validation-millis>3000</background-validation-millis>
</validation>
<timeout>
<blocking-timeout-millis>60000</blocking-timeout-millis>
<idle-timeout-minutes>5</idle-timeout-minutes>
</timeout>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
請讓我知道是否有任何問題。謝謝你通過我的問題。
AFAICT你不能從['datasource'](http://www.ironjacamar.org/doc/userguide/1.1/en-US/html_single/index.html#deployingds)「元素中配置它。我看不到任何選擇去做你想做的事。 –
感謝TT的評論。 –
也許如果你總結這不能從數據源元素中的選項完成,你應該改變你的問題+標題? –