2 Replies Latest reply on Jun 30, 2009 9:04 AM by Richard Ombati

    JMS MessageListener choking on application startup

    Naresh Bhatia Newbie

      Based on a previous discussion, I got my JMS MessageListener to call a Seam component. However, I am seeing a new problem now. When my web application first comes up and there are messages already waiting in the JMS queue, the EJB container starts to deliver them to the MessageListener but the Seam application is not yet initialized. I get repeated exceptions of the following type as the EJB container keeps retrying:


      javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside an initialized application
           at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:115)
              ...
      Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside an initialized application
           at org.jboss.ejb3.EJBContainer.invokeCallback(EJBContainer.java:1123)
           ... 22 more
      Caused by: java.lang.IllegalStateException: Attempted to invoke a Seam component outside an initialized application
           at org.jboss.seam.contexts.Lifecycle.getApplication(Lifecycle.java:36)
           ... 30 more
      



      After a while the EJB container gets tired and sends the messages off to the Dead Letter Queue. Does anyone have a solution to this problem?


      Thanks.


      Naresh