简体   繁体   English

JMS QUEUE应用程序作为罐子或耳朵

[英]JMS QUEUE application as jar or ear

This might be a stupid question. 这可能是一个愚蠢的问题。 I have two EJB project in my eclipse workspace, one is MDB and the other is Session bean. 我的Eclipse工作区中有两个EJB项目,一个是MDB,另一个是Session Bean。 And my client is successfully send messages to the queue in localhost. 而且我的客户端已成功将消息发送到本地主机中的队列。 Now i want to put my client to call the queue from a remote location. 现在,我想让我的客户端从远程位置调用队列。 Before I do this do I have to make an EAR combining the above two ejb project? 在执行此操作之前,我必须结合以上两个ejb项目进行EAR吗?

(I couldn't run my client successfully from remote location to address the jms queue, the problem might be calling the queue. I found many helps for this but all of them are talking about ear file, but I have two jar files) (我无法从远程位置成功运行客户端来解决jms队列,问题可能是在调用队列。我为此找到了很多帮助,但所有人都在谈论ear文件,但是我有两个jar文件)

PS: or is it possible to do this with jar files, I think yes, but do not know the right way Please guide me (server - jboss 5) Thank you PS:或者可以用jar文件来完成此操作,我想是的,但是不知道正确的方法,请指导我(服务器-jboss 5)谢谢

I have done this in the past, I had a number of web apps, producing JMS messages to be processed by some JMS beans (basically sending email). 过去,我有很多Web应用程序,它们生成JMS消息,以供某些JMS Bean处理(基本上是发送电子邮件)。 I did not deploy any EAR files, rather I did this. 我没有部署任何EAR文件,而是这样做了。

  1. webapps deployed as war files. 部署为war文件的webapp。
  2. JMS app deployed as a jar file, just containing the JMB classes. JMS应用程序部署为jar文件,仅包含JMB类。
  3. To add the plumbing, deploy the queue JNDI descriptor in the the deploy directory. 要添加管道,请在deploy目录中部署队列JNDI描述符。
  4. Makesure the JNDI descriptor for your queues is defined in the web.xml. 确保在web.xml中定义了队列的JNDI描述符。

An EAR file is a 'convenience' to allow a one step deployment of all the artifacts that make up your 'system', but you can deploy the individual components (jar files, war files, descriptors), also, your JMX console and log output will tell you what is being deployed. EAR文件是一种“便利”,可以一步一步地部署构成“系统”的所有工件,但是您可以部署单个组件(jar文件,war文件,描述符),还可以部署JMX控制台和日志输出将告诉您正在部署什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM