Using ActiveMQ 5.1.0 or 5.2.0 RC3. My JMS Message Producer runs continuosly. The messages are sent and then the program just hangs.
Here is the code I am using: import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.log4j.*; import org.apache.log4j.net.*; import javax.jms.*; public final class SimpleProducerFromFile { // Initializing the logger private static final Logger logger = Logger.getLogger(SimpleProducerFromFile.class); /** * A JMS Message producer using log4j. jms-1.1.jar(OpenJMS), * log4j-1.2.11.jar and activemq-all-5.1.0.jar should be included in the * class path. Sends to an ip and topic based on the constants above. * */ public static void main(String[] args2) { PropertyConfigurator.configure("C:\\log4j\\Config.txt"); logger.error("An error"); System.out.println("done"); } } Here is the config file: log4j.logger.SimpleProducerFromFile=DEBUG, jms log4j.appender.jms=org.apache.log4j.net.JMSAppender log4j.appender.jms.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory log4j.appender.jms.ProviderURL=tcp://192.168.0.102:61616 log4j.appender.jms.TopicConnectionFactoryBindingName=TopicConnectionFactory log4j.appender.jms.TopicBindingName=dynamicTopics/Topic Here is a Java thread dump from the program while it is still hanging: 2008-10-27 14:41:52 Full thread dump Java HotSpot(TM) Client VM (10.0-b23 mixed mode, sharing): "DestroyJavaVM" prio=6 tid=0x00395c00 nid=0xce4 waiting on condition [0x00000000..0x003ffd4c] java.lang.Thread.State: RUNNABLE "InactivityMonitor WriteCheck" daemon prio=6 tid=0x02df7c00 nid=0x5c0 in Object.wait() [0x031bf000..0x031bfb14] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x22fa8b40> (a java.util.TaskQueue) at java.util.TimerThread.mainLoop(Unknown Source) - locked <0x22fa8b40> (a java.util.TaskQueue) at java.util.TimerThread.run(Unknown Source) "InactivityMonitor ReadCheck" daemon prio=6 tid=0x02de3c00 nid=0x710 in Object.wait() [0x0316f000..0x0316fa94] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x22fa8bf0> (a java.util.TaskQueue) at java.util.TimerThread.mainLoop(Unknown Source) - locked <0x22fa8bf0> (a java.util.TaskQueue) at java.util.TimerThread.run(Unknown Source) "ActiveMQ Transport: tcp:///192.168.0.102:61616" prio=6 tid=0x02df0800 nid=0x290 runnable [0x0311f000..0x0311fb94] java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50) at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58) at java.io.DataInputStream.readInt(Unknown Source) at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:269) at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:203) at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:195) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183) at java.lang.Thread.run(Unknown Source) "Low Memory Detector" daemon prio=6 tid=0x02a66000 nid=0xc44 runnable [0x00000000..0x00000000] java.lang.Thread.State: RUNNABLE "CompilerThread0" daemon prio=10 tid=0x02a58400 nid=0xf18 waiting on condition [0x00000000..0x02d0f640] java.lang.Thread.State: RUNNABLE "Attach Listener" daemon prio=10 tid=0x02a57000 nid=0x840 waiting on condition [0x00000000..0x00000000] java.lang.Thread.State: RUNNABLE "Signal Dispatcher" daemon prio=10 tid=0x02a56400 nid=0xf0 runnable [0x00000000..0x00000000] java.lang.Thread.State: RUNNABLE "Finalizer" daemon prio=8 tid=0x02a4e400 nid=0x524 in Object.wait() [0x02c1f000..0x02c1fa94] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x22f687c8> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked <0x22f687c8> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source) "Reference Handler" daemon prio=10 tid=0x02a4d400 nid=0xba0 in Object.wait() [0x02bcf000..0x02bcfb14] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x22f68850> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Object.java:485) at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source) - locked <0x22f68850> (a java.lang.ref.Reference$Lock) "VM Thread" prio=10 tid=0x02a4c400 nid=0x7c0 runnable "VM Periodic Task Thread" prio=10 tid=0x02a79400 nid=0xad8 waiting on condition JNI global references: 914 Any assistance would be appreciated. Thanks, Austin -- View this message in context: http://www.nabble.com/JMS-Message-Producer-runs-continuosly-tp20369525p20369525.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.