[ 
https://issues.apache.org/activemq/browse/AMQ-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Rosenberg updated AMQ-1577:
---------------------------------

    Attachment: ConnectionPool.java
                FailoverTransport.java

I've included a patch built against a recent 5.1-SNAPSHOT source (svn rev 
618082)

The file FailoverTransport.java, includes fixes for 4 issues, including my fix 
for this issue.

The other issues that this patch includes fixes for are:

AMQ-1116
AMQ-1575
AMQ-1577
AMQ-1581

The file ConnectionPool.java is also needed for the fix for AMQ-1581

I've added comments in the code that clearly indicate which sections apply to 
which issue, so you can easily take edit to include only the fixes you want 
specifically.

Jason


> FailoverTransport doesn't shut-down cleanly, complains about underlying 
> transport going down
> --------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1577
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1577
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 5.0.0
>         Environment: 5.1-SNAPSHOT
>            Reporter: Jason Rosenberg
>         Attachments: ConnectionPool.java, FailoverTransport.java
>
>
> Hello,
> There's a problem with the FailoverTransport not shutting down cleanly.  It 
> appears that it shuts down it's underlying transport, e.g. TcpTransport, but 
> then doesn't disable it's handleTransportFailure thread, which then complains 
> that the underlying transport has gone away, and tries to restart it again.
> Looking at the code in FailoverTransport.java, there appears to be a simple 
> fix, to check the 'started' variable in the method 'handleTransportFailure' 
> before logging a warning and trying to restart the underlying transport.
> Here's a log snippet that demonstrates the problem:
> DEBUG [2008-02-04 03:44:05,752] thread:main                                
> FailoverTransport -- Stopped.
> DEBUG [2008-02-04 03:44:05,753] thread:main                                   
>   TcpTransport -- Stopping transport tcp://localhost/127.0.0.1:61616
> WARN  [2008-02-04 03:44:05,760] thread:ActiveMQ Transport: 
> tcp://localhost/127.0.0.1:61616              FailoverTransport -- Transport 
> failed, attempting to automatically reconnect due to: 
> java.net.SocketException: Socket closed
> java.net.SocketException: Socket closed
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:129)
>         at 
> org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
>         at 
> org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
>         at java.io.DataInputStream.readInt(DataInputStream.java:351)
>         at 
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:267)
>         at 
> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:203)
>         at 
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:195)
>         at 
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183)
>         at java.lang.Thread.run(Thread.java:637)
> Jason

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to