message-driven bean?


EJB design: message-driven bean?

  1. message-driven bean? (3 messages)

    Suppose applications are sending messages of various sorts. For example, SMS messages using different protocols.

    Some applications require more than just an acknowledgement
    from the SMSC that the message was accepted. For example,
    some message-generators may want some guarantee that the messages they paid to have delivered were actually delivered.

    One way to approach this problem would be to let applications drop messages into a JMS topic, and provide message listeners designed for particular types of messages. For example, if an application is sending SMPP SMS messages, then each message that needs to be "tracked" would be dropped in the topic, and a listener designed to handle SMPP SMS messages would be notified, and this listener would do whatever it needs to do.

    My question has to do with how to model these listeners. A possible choice might be an RMI singleton. The advantage might be that the singleton could have a collection of messages that it's tracking, and could access a database in a somewhat more efficient manner. I wonder if this approach will end up being problematic? Another possibility is to use Message-Driven Beans. But these do not have state, and there could be a very large number of instances.

    Any suggestions?


    Threaded Messages (3)

  2. message-driven bean?[ Go to top ]

    Can you explain what is SMS,SMSC,SMPP stand for?
  3. message-driven bean?[ Go to top ]

    Maybe I can rephrase the question without all of the annoying acronyms.

    What's the best way to create and use a singleton in an application server cluster? In particular, the singleton should be responding to activity in a JMS topic.

    One way to do this might be to have a message-driven bean listening on the topic, with the responsibility of handing messages to the singleton. The singleton then must be an RMI object.

    If this isn't ridiculous -- and please feel free to tell me if it is -- then there are probably specific steps that need to be taken to ensure that the singleton is really a singleton, and these precautions probably depend on the application server to some degree. (?)

    I'm using WLS6.0.

    Thanks for sharing any insights.

  4. message-driven bean?[ Go to top ]

    The question is why you want to have singletons in
    the first place. "application server cluster" won't like

    Second is why can't you use the JMS queue model.