[jboss-jira] [JBoss JIRA] Commented: (AS7-1218) Ability to specify a delay between URL round-robin attempts in HA datasource
Daniel Marchese (JIRA)
jira-events at lists.jboss.org
Thu Jul 7 15:20:23 EDT 2011
[ https://issues.jboss.org/browse/AS7-1218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612988#comment-12612988 ]
Daniel Marchese commented on AS7-1218:
--------------------------------------
I was hoping that I could obtain a good result using the existing <allocation-retry> and <allocation-retry-wait-millis> with a single URL pointing to the RAC instance but it is not working as expected because these 2 properties are not replicated to the TxConnectionManager instance.
I have tried to set the properties manually in debug mode and it works.
Here is my datasource configuration :
{code:java}
<local-tx-datasource>
<jndi-name>jdbc/ds</jndi-name>
<rar-name>jboss-local-jdbc.rar</rar-name>
<use-java-context>false</use-java-context>
<connection-definition>javax.sql.DataSource</connection-definition>
<jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
<min-pool-size>0</min-pool-size>
<max-pool-size>10</max-pool-size>
<blocking-timeout-millis>30000</blocking-timeout-millis>
<idle-timeout-minutes>30</idle-timeout-minutes>
<prefill>false</prefill>
<background-validation>false</background-validation>
<background-validation-millis>0</background-validation-millis>
<validate-on-match>true</validate-on-match>
<statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
<isSameRM-override-value>false</isSameRM-override-value>
<allocation-retry>2</allocation-retry>
<allocation-retry-wait-millis>10000</allocation-retry-wait-millis>
<application-managed-security xsi:type="securityMetaData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
<type-mapping>Oracle9i</type-mapping>
<local-transaction/>
<user-name>XXXX</user-name>
<password>XXXX</password>
<check-valid-connection-sql>SELECT * FROM DUAL</check-valid-connection-sql>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<prepared-statement-cache-size>0</prepared-statement-cache-size>
<share-prepared-statements>false</share-prepared-statements>
<set-tx-query-timeout>false</set-tx-query-timeout>
<query-timeout>0</query-timeout>
<use-try-lock>60000</use-try-lock>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<connection-url>jdbc:oracle:oci:@(DESCRIPTION=(ENABLE=BROKEN)(LOAD_BALANCE=off)(FAILOVER=on)(ADDRESS=(PROTOCOL=tcp)(HOST=cluster-scan)(PORT=1528))(CONNECT_DATA=(SERVICE_NAME=RAC_INSTANCE)(FAILOVER_MODE=(TYPE=select)(METHOD=basic)(RETRIES=180)(DELAY=1))))</connection-url>
</local-tx-datasource>
{code}
> Ability to specify a delay between URL round-robin attempts in HA datasource
> ----------------------------------------------------------------------------
>
> Key: AS7-1218
> URL: https://issues.jboss.org/browse/AS7-1218
> Project: Application Server 7
> Issue Type: Feature Request
> Components: JCA
> Affects Versions: 7.0.0.CR1
> Reporter: Daniel Marchese
>
> We have a configuration with Oracle RAC One Node (1 active database, 1 standby database) and we are testing HA possibilities.
> In one test, if we try to obtain a connection during the starting of the standby database after the active database crash, we get an ORA-12514 error because the standby instance is not ready to respond.
> Besides the fact that Oracle should not return an error but wait for the standby database to be ready to respond, it would be interesting if it was possible to specify a delay between URL round-roubin attempts in the HA datasource (ex: url-retry-wait-millis).
> This way, it would be possible to ask JBoss to wait before it tries the next URL in the list, giving the standby database the time to start.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list