|
Line 115
Link Here
|
|
|
115 |
* Add this method in order to fix COMM_FAILURE deadlock by Kent 2009-05-31 |
| 116 |
* Client-side implementation what to do when the underlying transport |
| 117 |
* is closed during a read operation. We mark the transport as closed |
| 118 |
* and allow it to be reopened later, when the client retries. |
| 119 |
*/ |
| 120 |
protected void streamClosedWithoutWriteLock() |
| 121 |
{ |
| 122 |
if (logger.isDebugEnabled()) |
| 123 |
{ |
| 124 |
logger.debug (this.toString() + ": streamClosedWithoutWriteLock()"); |
| 125 |
} |
| 126 |
|
| 127 |
closeAllowReopenWithoutWriteLock(); |
| 128 |
|
| 129 |
if( connection_listener != null ) |
| 130 |
{ |
| 131 |
connection_listener.streamClosed(); |
| 132 |
} |
| 133 |
} |
| 134 |
|
| 135 |
/** |
|
Line 143
Link Here
|
|
|
164 |
/** |
| 165 |
* Add this method in order to fix COMM_FAILURE deadlock by Kent 2009-05-31 |
| 166 |
* Closes the underlying transport, but keeps this ClientGIOPConnection |
| 167 |
* alive. If, subsequently, another request is sent to this connection, |
| 168 |
* it will try to reopen the transport. |
| 169 |
*/ |
| 170 |
private void closeAllowReopenWithoutWriteLock() |
| 171 |
{ |
| 172 |
if (logger.isDebugEnabled()) |
| 173 |
{ |
| 174 |
logger.debug (this.toString() + ": closeAllowReopenWithoutWriteLock()"); |
| 175 |
} |
| 176 |
|
| 177 |
//try |
| 178 |
//{ |
| 179 |
synchronized (connect_sync) |
| 180 |
{ |
| 181 |
//getWriteLock(); |
| 182 |
transport.close(); |
| 183 |
// We expect that the same transport can be reconnected |
| 184 |
// after a close, something that the ETF draft isn't |
| 185 |
// particularly clear about. |
| 186 |
} |
| 187 |
//} |
| 188 |
//finally |
| 189 |
//{ |
| 190 |
//releaseWriteLock(); |
| 191 |
//} |
| 192 |
} |
| 193 |
|