我正在尝试使用 Jboss 为 JMS 编写示例程序。我通过以下链接了解如何将 Jboss 用于 JMS
http://docs.jboss.org/jbossmessaging/docs/usermanual-2.0.0.beta1/html/using-jms.html
查找 ConnectionFactory 时出现异常,即“iniCtx.lookup("ConnectionFactory")”
javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1058)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1127)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
at javax.naming.InitialContext.lookup(Unknown Source)
at MessageProducer.main(MessageProducer.java:46)
Caused by: java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
at java.net.PlainDatagramSocketImpl.receive(Unknown Source)
at java.net.DatagramSocket.receive(Unknown Source)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1038)
原因是,Jboss Naming Service 没有运行(netstat -an doesn't show any result for port 1099) 。我没有为命名服务配置任何特定设置。我让它采用默认端口 1099。
我是否缺少任何配置?请帮助我运行 Jboss 命名服务。
规格 :
Jboss:AS 7.1.1 最终 JRE:1.6 操作系统:Windows 7