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>"Thread-1" prio=10 tid=0x00002aaad8001c00 nid=0x7e62 in Object.wait() [0x0000000041017000..0x0000000041017a90]<br> java.lang.Thread.State: WAITING (on object monitor)<br>
at java.lang.Object.wait(Native Method)<br> - waiting on <0x00002aaac931de50> (a com.rabbitmq.utility.BlockingValueOrException)<br> at java.lang.Object.wait(Object.java:485)<br> at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:58)<br>
- locked <0x00002aaac931de50> (a com.rabbitmq.utility.BlockingValueOrException)<br> at com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:95)<br> - locked <0x00002aaac931de50> (a com.rabbitmq.utility.BlockingValueOrException)<br>
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:41)<br> at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:274)<br> at com.rabbitmq.client.impl.ChannelN.basicCancel(ChannelN.java:697)<br>
at com.heysan.analyticsproxy_mq.Consumer.disconnect(Consumer.java:81)<br> at com.heysan.analyticsproxy_mq.Controller.exit(Controller.java:109)<br> at com.heysan.analyticsproxy_mq.Controller.update(Controller.java:57)<br>
at java.util.Observable.notifyObservers(Observable.java:142)<br> at java.util.Observable.notifyObservers(Observable.java:98)<br> at com.heysan.analyticsproxy_mq.Consumer.setExitFlag(Consumer.java:101)<br> at com.heysan.analyticsproxy_mq.Consumer.access$200(Consumer.java:18)<br>
at com.heysan.analyticsproxy_mq.Consumer$2.handleDelivery(Consumer.java:137)<br> at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:188)<br> at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:143)<br>
at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:94)<br> at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:445)<br><br>This is when execution stops at addShutdownListener:<br>
<br>"Thread-4" prio=10 tid=0x000000005cbdf000 nid=0x7f36 runnable [0x0000000040f16000..0x0000000040f16d10]<br> java.lang.Thread.State: RUNNABLE<br> at java.net.SocketInputStream.socketRead0(Native Method)<br>
at java.net.SocketInputStream.read(SocketInputStream.java:129)<br> at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)<br> at java.io.BufferedInputStream.read(BufferedInputStream.java:237)<br> - locked <0x00002aaac93076a8> (a java.io.BufferedInputStream)<br>
at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:271)<br> at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:111)<br> at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:143)<br>
- locked <0x00002aaac9307670> (a java.io.DataInputStream)<br> at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:284)<br> 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"><<a href="mailto:holger@wizards.de" target="_blank">holger@wizards.de</a>></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>
> I am trying to write a java application that can handle the rabbitmq<br>
> server going down and coming back up (or losing the connection to the<br>
> server and getting it back).<br>
</div>[..]<br>
<div>> ConnectionFactory factory = new ConnectionFactory(params);<br>
> connection = factory.newConnection(host, AMQP.PROTOCOL.PORT);<br>
> channel = connection.createChannel();<br>
> channel.accessRequest(this.realm);<br>
><br>
> Code above gets run through without any exceptions. But, when<br>
> reconnecting, the execution stops at this line, the method seems to<br>
> never return:<br>
><br>
> connection.addShutdownListener(shutdownListener);<br>
<br>
</div>Try to dump a stack trace so we can see who'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>
> I have once seen addShutdownListener throw a<br>
> ConcurrentModificationException, but the rabbitmq connection is not<br>
> 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>