You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Andrew Hurst <an...@2e-systems.com> on 2002/09/26 15:29:27 UTC
Rebinding to a JMS Server at runtime
Hi,
I'm using the JMSAppender in my application but if the JMS server it
publishes to goes down for some reason and then comes back up, my
application does not re-bind to it unless I restart my application.
When the JMS Server goes down, I get the following exception only once:
========
log4j:ERROR Could not publish message in JMSAppender [aerologic].
javax.jms.JMSException: Error in publish javax.jms.JMSException: Failed
to sendMessage java.rmi.UnmarshalException: Error unmarshaling return
header: java.net.SocketException: Connection reset by peer: Connection
reset by peer
========
Is there a way to re-initialise the appender at runtime? What I would
like to do perhaps, is to catch this exception and re-try the JMS Server
every 30 seconds or so.
Thanks in advance
Andrew Hurst
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Rebinding to a JMS Server at runtime
Posted by Ceki Gülcü <ce...@qos.ch>.
The attached pdf file from the complete manual might be of help.
At 15:29 26.09.2002 +0200, you wrote:
>Hi,
>
>I'm using the JMSAppender in my application but if the JMS server it
>publishes to goes down for some reason and then comes back up, my
>application does not re-bind to it unless I restart my application.
>
>When the JMS Server goes down, I get the following exception only once:
>
>========
>log4j:ERROR Could not publish message in JMSAppender [aerologic].
>javax.jms.JMSException: Error in publish javax.jms.JMSException: Failed to
>sendMessage java.rmi.UnmarshalException: Error unmarshaling return
>header: java.net.SocketException: Connection reset by peer: Connection
>reset by peer
>
>========
>
>Is there a way to re-initialise the appender at runtime? What I would like
>to do perhaps, is to catch this exception and re-try the JMS Server every
>30 seconds or so.
>
>Thanks in advance
>Andrew Hurst
--
Ceki
TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793