0 Replies Latest reply on Apr 15, 2008 8:28 AM by joe.marques

    dependency graph issues with durable MDBs

    Newbie

      I have a queue defined statically, in a *-service.xml file. I have an MDB listening to this durable queue.

      As a consequence of the data processing that happens upstream, this queue has messages inserted into it in bulk, so it's possible that a user will shutdown the app server while there are still messages in the queue because they couldn't all be processed before the server was taken down.

      When the server starts back up, the messages are processed, but they result in errors. Essentially, I gather that some of the downstream @EJB annotations haven't been resolved before the first message is delivered to the MDB.

      Our service layer has a few dozen SLSBs that have various cyclic dependencies. These cycles were broken as necessary by the use of @IgnoreDependency. Unfortunately, it just so happens that if the MDB's @EJB annotations are following (to determine what services need to be started in order to process a message), the @IgnoreDependency annotations are encountered earlier in the cycle, and some things remain unstarted.

      A fuller explanation of the problem, with an example and proposed work-around, can be found here: http://jira.rhq-project.org/browse/RHQ-217

      Aside from the fact that the solution is time-consuming (given that we have about 2 dozen uses of @IgnoreDependency that need to be moved around), I don't feel the solution will work in every scenario (I explain that too). I'm hoping someone can point me in the direction of a simpler, complete solution that will work no matter what the dependency graph looks like.