Showing posts from November, 2013

STOMP + SSL testing

See STOMP protocol here . Edit activemq/conf/activemq.xml and add the following transport connectors: Start activemq. Connect from the command line: For non SSL just       telnet localhost 61613 For SSL      openssl s_client -connect localhost:61614 Connect with (login/passcode is only required if AMQ configured for authentication): CONNECT accept-version:1.1 login:system passcode:manager host:localhost ^@ CONNECTED will be echo'd Subscribe to one or more queues: SUBSCRIBE id:0 destination:/queue/someQueueName ack:client ^@ Send a message: SEND destination:/queue/someQueueName content-type:text/plain hello queue a ^@ Should see the sent message echo'd See the protocol for more

Thread deadlock analysis

"waiting for monitor entry [0x00007f0e2bbfa000]" the hexadecimal address does not correspond directly with lock addresses. Test code: public class ThreadMonitorTest implements Runnable {   ThreadMonitorTest b;   public static void main(String[] args)   {     ThreadMonitorTest a = new ThreadMonitorTest();     a.b = new ThreadMonitorTest();     a.b.b = a;       new Thread(a).start();     new Thread(a.b).start();   }   public void run()   {     synchronized(this) {       try       {         this.wait(60000);         synchronized (b)         {           b.wait(60000);         }       }       catch (InterruptedException e)       {         e.printStackTrace();       }     }   } } Stacktraces taken while the above test program was executing. --------------------------------------------------------------------------------- Immediately after starting, timed waiting. Thread-1" prio=10 tid=0x00007f0e48114000 nid=0x256e in Object.wait() [0x00