6 Replies Latest reply: Jul 24, 2012 12:44 PM by Leonardo Devai RSS

    MDB does not get started in EAR file

    fan kam thong Newbie

      I have the following MDB which can be started with WAR file, but when I deployed the same MDB into EAR file, it just does not get started. Anyone has faced the same problem before ? Any pointers will be appreciated.

       

       

       

      @MessageDriven(name = "MessageMDBQueueSample" , activationConfig = {

                     @ActivationConfigProperty(propertyName = "destinationType" , propertyValue = "javax.jms.Queue" ),            

                     @ActivationConfigProperty(propertyName = "destination" , propertyValue = "queue/device" ),

                     @ActivationConfigProperty(propertyName = "acknowledgeMode" , propertyValue = "Auto-acknowledge" ) })

       

       

       

       

      public class MDBQueueSample implements MessageListener{

       

       

              public void onMessage(Message message) {

                   

                    ObjectMessage objectMessage = (ObjectMessage)message;

                    System.out.println("I AM HERE");

             }

            

              @PostConstruct

              public void mdbInit()

             {

                    System. out.println("Doing Post Construct...." );       

             }

            

              @PreDestroy

              public void cleanUp()

             {

                    System. out.println("Doing Cleaning-up........" );

             }

      }