Re: AbortChannelException terminates session
Huston <[email protected]> 04 Jun 2003 11:11:06 -0600
| Newsgroups | gmane.network.beep.beepcore.java.general |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2003-06-04 at 09:52, Paul Andrews wrote: > Hi again :-) > > I have a message reply listener that throws an AbortChannelException in > certain circumstances but this actually causes the session code to issue > a terminate session request to the remote peer - when all I wanted to do > was to terminate the channel. > > A slight wrinkle with this is that my test code originally called > session.close() immediately after the AbortChannelException was thrown, > but in a different thread. This caused the session to deadlock. > > - Paul In the code I'm working on right now I have removed AbortChannelException from the signature of the MessageHandler.receiveMSG(). (MessageHandler is a new version of MessageListener, the reason for a new interface was to provide a migration path for profile writers.) While AbortChannelException made some things easier when writing profiles I think it can be the source of more problems than good. BTW, I'm also considering removing the throws BEEPError from the receiveMSG() method because there isn't a good method of notifying the profile if there is a problem sending the ERR message from the BEEPError exception. Instead profiles would call MessageMSG.sendERR() directly. Any feedback on these changes is welcome and right now is the best time since I am in the middle of making them. --Huston ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.