1 Reply Latest reply on Jul 29, 2011 3:21 PM by Leo van den berg

    Invoking a Seam component's method via JMX

    André Stein Newbie

      Hi there,


      I'm currently (unsuccessfully) trying to invoke a reload-method on a Seam component via JMX. Working with 2.0.1.GA (stuck on this version for several reasons).
      There is my Config-component that's resposible for reading config values at startup from several xml files and centrally allowing other components to access these config values. When the config changes, I have to restart the JBoss to get the new config values. Now I'm trying to avoid this by calling the readConfiguration() method directly via JMX when there was a config change. Unfortunately, several attempts don't work. I tried to work with http://seamframework.org/Documentation/JMXComponents as an inspiration, but when I try to inject my config component into the MBean, it's always null. Also, this easy example without seam http://javathreads.de/2008/06/eine-ejb-als-jmx-mbean-fuer-jboss-as-erstellen/ works, I can call the sample method via JMX-console in my JBoss, but when I try to inject my Config component, it fails. Is there a place where I can find a working example? Does anybody have experience with this approach? Any ideas what might be the problem?


      Thanks in advance,
      --
      André