Got it - thanks! I've now set-up an ExceptionListener and have been able to generate an exception.
For anyone else interested - if you're using the emulator and simulate a network failure by simply turning off the network in the emulator configuration, an exception of System.IO.IOException is thrown. regards, Tammer 2010/1/26 Timothy Bish <tabish...@gmail.com> > On Tue, 2010-01-26 at 07:50 -0800, Tammer Salem wrote: > > Hello All, > > I've successfully written a .NET Compact Framework client that can send > and > > receive messages using the new NMS Stomp packages (Excellent work!) > > > > I'm now trying to cater for dropped connections. The application will > have > > to receive messages, even if it has to recover from communication > failures > > (3G/GPRS connection interruptions). Therefore I've used two methods > > > > ConnectionInterruptedListener > > ConnectionResumedListener > > > > The ConnectionInterruptedListener should pick up a lost connection where > I > > gracefully tidy up a couple of things. Then I use > ConnectionResumedListener > > to re-establish a connection with activemq. > > > > The strange thing is that none of these listeners are working when I cut > the > > connection. Currently I'm doing this in the Pocket PC WM5.0 emulator by > > switching off the network connectivity from the emulator (not > gracefully). > > When I restart the connection the appropriate listener does not fire, and > of > > course I've lost connection to activemq, but neither the server or the > > consumer is aware of this. > > > > Any ideas? > > The NMS.Stomp client doesn't have any sort of Failover transport so > these events aren't hooked up to anything. When the connection is > broken you should see an event fired to a registered ExceptionListener. > The ConnectionInterrupted and ConnectionResumed events are for > Connections that are managed and can be reconnected internally, they > give your client notice that there isn't a connection so your send might > block, etc. > > Regards > Tim. > > > -- > Tim Bish > http://fusesource.com > http://timbish.blogspot.com/ > > > >