2 Replies Latest reply on May 2, 2007 11:53 AM by Ben Catherall

    Best way for JMX MBean to depen on Seam initialization?

    Daniel Young Novice

      Hi all,

      I have a problem whereby a JMX MBean that polls a directory for files sends JMS messages, and the message-driven bean listening on this queue is a Seam component (mainly so it can use some edge-case Seam components like Messages, etc. It's not essential, but is handy).

      Unfortunately, if the polled directory contains files on startup, the JMS messages fire before Seam is initialised and I get exceptions about trying to invoke Seam outside of a web app context.

      I already have my directory poller MBean configured so that it depends on the JMS queue starting first. But is it possible to configure an MBean so that it depends on Seam to be initialised? Is there a Seam JMX wrapper, or a way for me to depend on a particular servlet, or my EAR, etc?

      I've tried a few clauses, but nothing that worked so far.

      thanks kindly,