1
votes

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?
1
what you mean by main server Tomcat or Weblogic or Which one ???sunleo
@sunleo Both servers are Weblogic 10.3Eng.Fouad

1 Answers

0
votes

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.