0 Replies Latest reply on Jan 24, 2003 4:42 AM by masv

    Problem with topic connection from applet

    masv

      I am having a problem with topic connections.

      I am running JBoss 3.0.4 and I am subscribing to the topic on the server from an applet (running in Mozilla 1.0). It works just fine until I try to reload the applet. Reload works once or twice and then, the next time I reload, the Java console is filled with an exception coming from the method where I tried to subscribe to the topic. Of course, before the applet is reloaded I perform a close of the topic subscription.
      This problem _only_ occurs under two circumstances:
      1. when I close the connection in Applet::destroy()
      2. when the applet lies on a topframe, i.e., not in a frame.

      The exception that occurs is as follows (client side):

      makeConnection() >> JMSException: org.jboss.mq.SpyJMSException: Failed to create TopicConnection; - nested throwable: (java.lang.IllegalThreadStateException)
      org.jboss.mq.SpyJMSException: Failed to create TopicConnection; - nested throwable: (java.lang.IllegalThreadStateException)
      at org.jboss.mq.SpyConnectionFactory.createTopicConnection(SpyConnectionFactory.java:84)
      at NavAidApplet.makeConnection(NavAidApplet.java:448)
      at NavAidApplet.jmsTimeOut(NavAidApplet.java:305)
      at NavAidApplet.actionPerformed(NavAidApplet.java:544)
      at javax.swing.Timer.fireActionPerformed(Timer.java:271)
      at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
      Caused by: java.lang.IllegalThreadStateException
      at java.lang.ThreadGroup.add(ThreadGroup.java:798)
      at java.lang.Thread.init(Thread.java:303)
      at java.lang.Thread.(Thread.java:440)
      at org.jboss.mq.Connection$1.newThread(Connection.java:195)
      at EDU.oswego.cs.dl.util.concurrent.ClockDaemon.restart(ClockDaemon.java:285)
      at EDU.oswego.cs.dl.util.concurrent.ClockDaemon.executePeriodically(ClockDaemon.java:235)
      at org.jboss.mq.Connection.startPingThread(Connection.java:1201)
      at org.jboss.mq.Connection.(Connection.java:251)
      at org.jboss.mq.Connection.(Connection.java:264)
      at org.jboss.mq.SpyConnection.(SpyConnection.java:59)
      at org.jboss.mq.SpyConnectionFactory.createTopicConnection(SpyConnectionFactory.java:78)
      ... 12 more

      Kind regards,
      masv