配置JBoss.xml:<message-driven>
            <ejb-name>LogBean</ejb-name>
            <configuration-name>Standard Message Driven Bean</configuration-name>
            <destination-jndi-name>topic/testTopic</destination-jndi-name>
        </message-driven>打包后部署成功,没有抛任何异常,但是执行客户端后,服务器端什么输出都没有,不知道是什么原因,望指点

解决方案 »

  1.   

    catch(Exception e){    }
    这里把你的e打印出来看看 !!!
    e.print......()忘了怎么拼了,就是打印出错信息 ------------------------------------------------------
               我们还年轻牛奶会有的奶牛也会有的 
                 可天天在 csdn 混这些会有吗 ??
      

  2.   

    我把TopicConnectionFactory改了一下:
    TopicConnectionFactory factory=(TopicConnectionFactory)ctx.lookup("java:/XAConnectionFactory");现在可以看到输出,但是服务器端抛出异常:
    16:28:07,570 WARN  [OILServerILService] Connection failure (1).
    java.net.SocketException: Connection reset
            at java.net.SocketInputStream.read(SocketInputStream.java:168)
            at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
            at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
            at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java
    :2133)
            at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(Object
    InputStream.java:2316)
            at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStre
    am.java:2383)
            at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream
    .java:2455)
            at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputSt
    ream.java:2604)
            at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
            at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.
    java:205)
            at java.lang.Thread.run(Thread.java:536)