简体   繁体   English

实施远程JMS服务器

[英]Implement remote JMS server

I am developing an SMS application, and I am using JMS within it. 我正在开发一个SMS应用程序,并且正在其中使用JMS。 Here is a simple chart shows how I would implement the application: 这是一个简单的图表,显示了如何实现该应用程序:

---------------------------                      ---------------------------
|                         |                      |                         |
|                         |                      |                         |
|      [Main Server]      |                      |       [JMS Server]      |
|   (JSPs and Servlets)   | -------------------> |                         |
|                         |                      |     ----------------    |
|                         |        ????          |     |  |  |  |  |  |    |
|                         |                      |     ----------------    |
|                         |                      |         JMS queue       |
|                         |                      |                         |
|                         |                      |            @            |
|                         |                      |  JMS ConnectionFactory  |
---------------------------                      ---------------------------

So basically, end-users send SMS messages via the main server. 因此,基本上,最终用户通过主服务器发送SMS消息。 The main server redirects the messages to the JMS server. 主服务器将消息重定向到JMS服务器。 The JMS server receives the messages and puts it into the queue to handle it immediately or later. JMS服务器接收消息并将其放入队列中以立即或稍后对其进行处理。

I have couple of questions regarding the design, in term of what the proper way to implement the JMS is: 关于实现JMS的正确方法是什么,我对设计有几个问题:

  • Is it right to place the ConnectionFactory at the JMS server or should I move it to the main server? 将ConnectionFactory放置在JMS服务器上是否正确,还是应该将其移到主服务器上? or maybe deploy it twice on both servers? 还是在两台服务器上都部署两次?
  • What should I use to send the messages from the main server to the JMS server? 我应该使用什么将消息从主服务器发送到JMS服务器? JMS-Bridge? JMS-Bridge? JMS foreign server? JMS国外服务器? EJBs? EJB? RMI? RMI? Or maybe something else better? 还是其他更好的东西?
  • Should I use JNDI-lookup or Resources injection for JMS modules? 我应该对JMS模块使用JNDI查找或资源注入吗?

Is it right to place the ConnectionFactory at the JMS server or should I move it to the main server? 将ConnectionFactory放置在JMS服务器上是否正确,还是应该将其移到主服务器上? or maybe deploy it twice on both servers? 还是在两台服务器上都部署两次?

Create JMS ConnectionFactory in Weblogic and get using JNDI Lookup in Application. 在Weblogic中创建JMS ConnectionFactory,并在Application中使用JNDI查找。 Avoid duplication connectionFactory. 避免重复连接工厂。

Use ActiveMQ like MessageBroker. 使用ActiveMQ,例如MessageBroker。

What should I use to send the messages from the main server to the JMS server? 我应该使用什么将消息从主服务器发送到JMS服务器? JMS-Bridge? JMS-Bridge? JMS foreign server? JMS国外服务器? EJBs? EJB? RMI? RMI? Or maybe something else better? 还是其他更好的东西?

How to send JMS Message 如何发送JMS消息

Should I use JNDI-lookup or Resources injection for JMS modules? 我应该对JMS模块使用JNDI查找或资源注入吗?

When you are using Application server like Weblogic getting connectionFactory by JNDI is good. 当您使用Weblogic之类的应用程序服务器时,通过JNDI获得connectionFactory是很好的。

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

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