0 Replies Latest reply on Nov 7, 2002 10:53 AM by Erik

    Multiple MDB Instances Receive Same Message From Topic

    Erik Newbie


      I've got a problem for which I hope there is a simple solution. I've written an MDB whose main purpose is to archive messages to a database. It subscribes to a topic via a non-durable subscription (will be changed to a durable subscription later). My problem is that JBoss instantiates multiple instances of my bean and when a message arrives, all of the instances receive a copy of it and they all create a record in the database. I can't convert the topic to a queue because other clients subscribe to the topic and need access to the same message.

      Has anyone else run into this type of scenario? Any recommendations? Can I prevent JBoss from instantiating my bean multiple times (not very scalable, I know)?

      Here's my current JBoss.xml from the bean:

      <configuration-name>Archiver Messagage Driven Bean</configuration-name>
      <container-configuration extends="Standard Message Driven Bean">
      <container-name>Archiver Messagage Driven Bean</container-name>