Thank you!, the key combo is ctrl+\ and this is what I get. I do not really understand this, so I am very thankful for anything that makes me understand it a little further. I few other threads are running in the application, but they have no interaction with rabbitmq so I wont paste them here, unless they are needed.<br>
<div class="gmail_quote">
<br>This is when execution stops at basicCancel:<br><br>&quot;Thread-1&quot; prio=10 tid=0x00002aaad8001c00 nid=0x7e62 in Object.wait() [0x0000000041017000..0x0000000041017a90]<br>&nbsp;&nbsp; java.lang.Thread.State: WAITING (on object monitor)<br>

&nbsp;&nbsp;&nbsp; at java.lang.Object.wait(Native Method)<br>&nbsp;&nbsp;&nbsp; - waiting on &lt;0x00002aaac931de50&gt; (a com.rabbitmq.utility.BlockingValueOrException)<br>&nbsp;&nbsp;&nbsp; at java.lang.Object.wait(Object.java:485)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:58)<br>

&nbsp;&nbsp;&nbsp; - locked &lt;0x00002aaac931de50&gt; (a com.rabbitmq.utility.BlockingValueOrException)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:95)<br>&nbsp;&nbsp;&nbsp; - locked &lt;0x00002aaac931de50&gt; (a com.rabbitmq.utility.BlockingValueOrException)<br>

&nbsp;&nbsp;&nbsp; at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:41)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:274)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.ChannelN.basicCancel(ChannelN.java:697)<br>

&nbsp;&nbsp;&nbsp; at com.heysan.analyticsproxy_mq.Consumer.disconnect(Consumer.java:81)<br>&nbsp;&nbsp;&nbsp; at com.heysan.analyticsproxy_mq.Controller.exit(Controller.java:109)<br>&nbsp;&nbsp;&nbsp; at com.heysan.analyticsproxy_mq.Controller.update(Controller.java:57)<br>

&nbsp;&nbsp;&nbsp; at java.util.Observable.notifyObservers(Observable.java:142)<br>&nbsp;&nbsp;&nbsp; at java.util.Observable.notifyObservers(Observable.java:98)<br>&nbsp;&nbsp;&nbsp; at com.heysan.analyticsproxy_mq.Consumer.setExitFlag(Consumer.java:101)<br>&nbsp;&nbsp;&nbsp; at com.heysan.analyticsproxy_mq.Consumer.access$200(Consumer.java:18)<br>

&nbsp;&nbsp;&nbsp; at com.heysan.analyticsproxy_mq.Consumer$2.handleDelivery(Consumer.java:137)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:188)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:143)<br>

&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:94)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:445)<br><br>This is when execution stops at addShutdownListener:<br>

<br>&quot;Thread-4&quot; prio=10 tid=0x000000005cbdf000 nid=0x7f36 runnable [0x0000000040f16000..0x0000000040f16d10]<br>&nbsp;&nbsp; java.lang.Thread.State: RUNNABLE<br>&nbsp;&nbsp;&nbsp; at java.net.SocketInputStream.socketRead0(Native Method)<br>

&nbsp;&nbsp;&nbsp; at java.net.SocketInputStream.read(SocketInputStream.java:129)<br>&nbsp;&nbsp;&nbsp; at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)<br>&nbsp;&nbsp;&nbsp; at java.io.BufferedInputStream.read(BufferedInputStream.java:237)<br>&nbsp;&nbsp;&nbsp; - locked &lt;0x00002aaac93076a8&gt; (a java.io.BufferedInputStream)<br>

&nbsp;&nbsp;&nbsp; at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:271)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:111)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:143)<br>

&nbsp;&nbsp;&nbsp; - locked &lt;0x00002aaac9307670&gt; (a java.io.DataInputStream)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:284)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:427)<div>
<div></div><div class="Wj3C7c"><br>
<br><div class="gmail_quote">On Thu, Dec 11, 2008 at 10:06 AM, Holger Hoffstätte <span dir="ltr">&lt;<a href="mailto:holger@wizards.de" target="_blank">holger@wizards.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div>Jonatan Kallus wrote:<br>
&gt; I am trying to write a java application that can handle the rabbitmq<br>
&gt; server going down and coming back up (or losing the connection to the<br>
&gt; server and getting it back).<br>
</div>[..]<br>
<div>&gt; ConnectionFactory factory = new ConnectionFactory(params);<br>
&gt; connection = factory.newConnection(host, AMQP.PROTOCOL.PORT);<br>
&gt; channel = connection.createChannel();<br>
&gt; channel.accessRequest(this.realm);<br>
&gt;<br>
&gt; Code above gets run through without any exceptions. But, when<br>
&gt; reconnecting, the execution stops at this line, the method seems to<br>
&gt; never return:<br>
&gt;<br>
&gt; connection.addShutdownListener(shutdownListener);<br>
<br>
</div>Try to dump a stack trace so we can see who&#39;s calling what.<br>
Easiest to do with jconsole or visualvm, or with the magic key combo that<br>
I cannot remember right now..<br>
<div><br>
&gt; I have once seen addShutdownListener throw a<br>
&gt; ConcurrentModificationException, but the rabbitmq connection is not<br>
&gt; running in a multithreaded environment.<br>
<br>
</div>CME has nothing to do with threading and can also occur e.g. in recursive<br>
code that improperly modifies the iterated collection.<br>
<br>
-h<br>
<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</blockquote></div><br>
</div></div></div><br>