将远程JMS客户端连接到GlassFish 3 [英] Connecting a remote JMS client to GlassFish 3

查看:95
本文介绍了将远程JMS客户端连接到GlassFish 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从独立的远程客户端连接到GlassFish 3的JMS服务。但是我得到一个java.lang.ClassNotFoundException:com.sun.messaging.jms.ra.ResourceAdapter。关于如何解决这个问题的任何想法?



这是我的设置到目前为止:


    JNDI属性指定如下:

    java.naming.factory.initial = com.sun.enterprise.naming.SerialInitContextFactory
    java.naming.factory.url。 pkgs = com.sun.enterprise.naming
    java.naming.factory.state = com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl


  • 添加到独立应用程序的类路径中的gf-client-module.jar(在GLASSFISH_HOME / modules中)。还尝试添加模块目录中存在的其他jar(例如jms-core.jar),但仍然得到相同的ClassNotFoundException。




任何帮助将不胜感激。

解决方案

好的。我找到了解决方案。请参阅此处的细节,但简短的答案是,我需要添加两个罐子类路径:imqjmsra.jar和imqbroker.jar。这些可以在名为imqjmsra.rar的rar中找到,它可以在glassfish的mq目录下找到。我必须从这个rar中提取两个罐子!


I am trying to connect to GlassFish 3's JMS service from a standalone remote client. However I am getting a java.lang.ClassNotFoundException: com.sun.messaging.jms.ra.ResourceAdapter. Any ideas on how to fix this?

Here's my setup so far:

  • Glassfish 3 JMS Service in LOCAL mode (I am assuming that EMBEDED mode will not work in this case because it bypasses the network stack)

  • JNDI properties are specified as follows:

    java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory java.naming.factory.url.pkgs=com.sun.enterprise.naming java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl

  • gf-client-module.jar (in GLASSFISH_HOME/modules) added to the standalone application's classpath. Also tried adding other jars present in the modules directory (such as jms-core.jar), but still getting the same ClassNotFoundException.

Any help would be much appreciated.

解决方案

Ok. I found a solution. See here for details, but the short answer is that I needed to add two jars to the classpath: imqjmsra.jar and imqbroker.jar. These were available inside a rar called imqjmsra.rar which can be found under glassfish's mq directory. I had to extract the two jars from this rar!

这篇关于将远程JMS客户端连接到GlassFish 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆