activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Gale <paul.n.g...@gmail.com>
Subject Re: Retry connection on broker start when database is unavailable
Date Mon, 24 Jun 2013 17:41:18 GMT
Would it make a difference if you used the JDBCIOExceptionHandler instead
of the default one perhaps? Just a thought.

<broker ioExceptionHandler="#handler_id">
</broker>

<!-- dummy values -->
<bean id="handler_id"
class="org.apache.activemq.store.jdbc.JDBCIOExceptionHandler">
  <property name="ignoreSQLExceptions" value="true" />
  <property name="ignoreAllErrors" value="false" />
  <property name="stopStartConnectors" value="true"/>
</bean>


On Mon, Jun 24, 2013 at 12:35 PM, afant <allenfant@gmail.com> wrote:

> I just tried the 5.9 nightly snapshot.  On my broker I set
> restartAllowed="true".  Then, I tried to start the broker while the
> database
> was down, and the broker still failed to start.  I saw a restart was
> triggered by the default IO exception handler, and since the database was
> still down a RuntimeException was thrown ("Failed to execute start task.
> Reason: java.lang.IllegalStateException: BeanFactory not initialized or
> already closed - call 'refresh' before accessing beans via the
> ApplicationContext....)
>
> The desired behavior would be to just continue to retry the database
> connection.  I even tried adding retryconnection parameters to mysql url
> ex:
> autoReconnect=true&amp;maxReconnects=2147483647.
>
> Thanks,
> Allen
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Retry-connection-on-broker-start-when-database-is-unavailable-tp4668329p4668528.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message