9 Replies Latest reply on Nov 18, 2008 6:42 AM by jaikiran

    Need Urgent Help; MDB

    amiratalbi

      Hi;
      I need to know if there is an issue to configure my EJB3 MDB to not concume next message while the current one is proceeded. I did it by setting the maxPoolSize to One and the behaviour is what I need to have. But, our client said to me that by setting that, our MDB will not run in a Clustered env. and also we don't have to use JBoss anno. in source code for portability.

      Please, is there an other issue. I'm stucked .... And nedd an urgent help:(
      Thnks in advance

        • 1. Re: Need Urgent Help; MDB
          jaikiran
          • 2. Re: Need Urgent Help; MDB
            amiratalbi

            Hi Jikiran;
            thkx for your help;
            I tried this solution earlier but it doesn't seam to resolve my problem. Many entityManager updates are lost :(

            Is there an other issue ???
            Thkx in advance

            • 3. Re: Need Urgent Help; MDB
              jaikiran

               

              "AmiraTalbi" wrote:
              Hi Jikiran;

              I tried this solution earlier but it doesn't seam to resolve my problem. Many entityManager updates are lost :(



              I thought you were trying to setup a singleton MDB. Can you please provide more details about what you are trying to do? I did not understand what you meant by entitymanager updates being lost. Please provide the version of JBoss and Java that you are using and also what your application is trying to do.


              • 4. Re: Need Urgent Help; MDB
                amiratalbi

                I have a JBPM process that sends MEssages (communication control blocks) to a given MDB queue. these message are being translated when they are received by the bean.

                My problematic is to consume messages one by one, in other words, when transaction 1 have finished, MDB must consume the next message in queue.

                In normal execution, MDB open a new Transaction for each received message, so, I'm finishing with multiple concurrent sessions that may update the same data concurrently. And As a result, .... many times my data updates are lost ....


                So, I have to organize message consommation by MDB

                I hope being clear

                • 5. Re: Need Urgent Help; MDB
                  jaikiran

                  Okay i now get some idea about what you are trying to do :-)

                  Going back to my earlier reply, did you configure the MDB to be a singleton as explained in the wiki? I would recommend that you try this first on a non-clustered setup and get the singleton MDB and your entity updates working. If it does not work even on a non-clustered setup, you might be having some other issues in the application.

                  Let us know how it goes on a non-clustered setup. If it works on this setup then we can see why it does not work on a clustered setup. I assume you have read the "This doesn't work in a cluster?" section in that wiki, which explains what has to be done on a clustered setup.

                  • 6. Re: Need Urgent Help; MDB
                    amiratalbi

                    Hi jaikiran;
                    I tried the maxSessions annotation and when debugging, It seems that MD is not paying attention for that. All messages are proceeded in arriving time

                    thkx

                    • 7. Re: Need Urgent Help; MDB
                      amiratalbi

                      I'm running actually in a non clustered environnement

                      • 8. Re: Need Urgent Help; MDB
                        jaikiran

                        Which version of JBoss and Java do you use?

                        • 9. Re: Need Urgent Help; MDB
                          jaikiran

                          I do have a simple EJB3 application in JBoss-4.2.3 GA in which i have the singleton MDB working. So please post your code in the MDB (along with the annotations) and also the steps that you are following to test that only one instance is created.

                          While posting the logs or code or xml content, remember to wrap it in a code block using the Code button in the message editor window and please hit the Preview button to make sure your post is correctly formatted