6 Replies Latest reply on Feb 19, 2012 12:08 AM by devisri

    Message Driven Bean instance not created in JBoss EAP 4.3

    devisri Newbie

      Hi Friends,

       

      I have deployed an EJB application which containts only Message Driven Bean.

       

      The deployment was successful as seen by the server messages.

       

      But the Message Driven Bean instance is not created.

       

      I have the no-arg constructor , onMessage method, ejbcreate method, ejbTimeout method, setMessageDrivenContext method, and ejbRemove methods defined in my MDB.

      And the MDB is implementing MessageDrivenBean, MessageListener, and TimedObject.

       

      I was expecting S.O.Ps to be printed , which i have given in my constructor and setmessagedrivencontext methods.

       

      But the S.O.Ps are not printed, because the MDB instance is not created , i think so.

       

      Can you please help me out, why MDB instance is not created..

       

      I have attached ejb-jar.xml and jboss.xml files that are in my META-INF folder.

       

      Thanks,

      Devisri.

        • 1. Re: Message Driven Bean instance not created in JBoss EAP 4.3
          Wolf-Dieter Fink Master

          I suppose that you are using EJB2.1, right?

          Normally there is no message printed during startup, also the container might not create the bean unless a message is in the queue.

           

          Do you see an activity if you send a message to the queue by client?

          • 2. Re: Message Driven Bean instance not created in JBoss EAP 4.3
            devisri Newbie

            Hi Wolf-Dieter,

             

            Yes, I am using EJB 2.1 .

             

            This same application when it was deployed in weblogic 9.2 server,  the startup messages were printed.

            Now, we are migrating the application to JBoss 4.3 EAP.

            since now the startup messages are not printed, i got worried whether the bean instance is created or not.

             

            Thanks,

            Devisri.

            • 3. Re: Message Driven Bean instance not created in JBoss EAP 4.3
              Wolf-Dieter Fink Master

              Yep, migrating is a difficult and special thing with EJB2.

              So you will find a lot of issues where two app server are different if you are a bit beside the spec or where the spec is not very clear.

               

              Where do you log the 'startup' message?

              Does the bean is created and handle the message if you fill the queue?

               

              Do you have EAP support? Or just evaluate the EAP version?

              I would prefer EAP 5.1. Also you might raise a support ticket if you have a support subscription.

              • 4. Re: Message Driven Bean instance not created in JBoss EAP 4.3
                devisri Newbie

                Hi Wolf-Dieter,

                 

                My issue got resolved for the MDB, regarding it's creation.

                 

                What is said is right. When we put a message in queue and tested and commented all the logger messages, the message-driven bean instance is created.

                 

                Now, the problem is with log4j.properties file.

                 

                The properties file is not being picked up by the EJB application .

                 

                I tried many ways to put the properties file in all paths,  but with no success.

                 

                Kindly tell me , where should i put my properties file , so that the application can pick up that.

                 

                Thanks,

                Devisri.

                • 5. Re: Message Driven Bean instance not created in JBoss EAP 4.3
                  Wolf-Dieter Fink Master

                  Hi Devisri,

                   

                  good to hear that the issue is solved.

                   

                  For the log4j I use the JBoss configuration conf/jboss-log4j.xml because this is picked up during runtime.

                  I know that the configuration can packed with the application but I never tried that. You might search for answers in the community

                  or

                  mark this thread as 'answered' and start a new one with the correct subject

                  • 6. Re: Message Driven Bean instance not created in JBoss EAP 4.3
                    devisri Newbie

                    Dear all,

                     

                    My issues are resolved now. Migrated my application successfully to JBoss 5.1 EAP from weblogic 9.2.

                     

                    Sincere thanks to Wolf-Dieter Fink.

                     

                    Some points here which may be useful for anyone.

                     

                    Regarding log4j.properties file, i kept it under the root of the app. The logpath whatever i mention like 'www/mylog/' was being created inside the bin folder of the linux server.

                    When the logpath starts with forward slash , then it is taking the absolute root path of the server.

                     

                    I didn't made any changes in the jboss-log4j.xml file.

                     

                    Thanks,

                    Devisri.