简体   繁体   中英

Implement remote JMS server

I am developing an SMS application, and I am using JMS within it. 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. The main server redirects the messages to the JMS server. The JMS server receives the messages and puts it into the queue to handle it immediately or later.

I have couple of questions regarding the design, in term of what the proper way to implement the JMS is:

  • Is it right to place the ConnectionFactory at the JMS server or should I move it to the main server? 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-Bridge? JMS foreign server? EJBs? RMI? Or maybe something else better?
  • Should I use JNDI-lookup or Resources injection for JMS modules?

Is it right to place the ConnectionFactory at the JMS server or should I move it to the main server? or maybe deploy it twice on both servers?

Create JMS ConnectionFactory in Weblogic and get using JNDI Lookup in Application. Avoid duplication connectionFactory.

Use ActiveMQ like MessageBroker.

What should I use to send the messages from the main server to the JMS server? JMS-Bridge? JMS foreign server? EJBs? RMI? Or maybe something else better?

How to send JMS Message

Should I use JNDI-lookup or Resources injection for JMS modules?

When you are using Application server like Weblogic getting connectionFactory by JNDI is good.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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