0 Replies Latest reply on Jan 25, 2013 3:52 AM by Hans-Michael Rupp

    XMBean persistence does not work

    Hans-Michael Rupp Novice



      I am trying to implement a XMBean. It deploys, it is displayed in the JMX console, the attribute can be changed, however the the attribute value is not persisted. After a server restart the attribute value is back to the default (false)


      JBoss 4.2.3


      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE mbean PUBLIC "-//JBoss//DTD JBOSS XMBEAN 1.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_0.dtd">


          <description>Konfiguration von Sepa</description>


              <persistence persistPolicy="OnUpdate" persistPeriod="20000"

                  persistLocation="${jboss.server.data.dir}" persistName="Sepa.ser" />

              <currencyTimeLimit value="10" />

              <state-action-on-update value="keep-running" />


                  value="org.jboss.mx.persistence.ObjectStreamPersistenceManager" />




              <description>The default constructor</description>



          <attribute access="read-write" getMethod="getUseSepa"


              <description>Soll Sepa anstatt DTAUS benutzt werden</description>





              <description>The start lifecycle operation</description>




              <description>The stop lifecycle operation</description>





      public interface Sepa {


          public boolean getUseSepa();

          public void setUseSepa(Boolean useSepa);


          public void start();

          public void stop();




      import org.apache.log4j.Logger;

      import org.jboss.annotation.ejb.Management;

      import org.jboss.annotation.ejb.Service;


      @Service(objectName="configuration.service:service=SepaManager", xmbean="resource:META-INF/bafoeg21sepa-xmbean.xml")


      public class SepaManager implements Sepa {


          private static Logger log = Logger.getLogger(SepaManager.class);


          private boolean useSepa;


          public SepaManager() {

              log.info("SepaManager constuctor");




          public boolean getUseSepa() {

              return this.useSepa;




          public void setUseSepa(Boolean useSepa) {

              this.useSepa = useSepa;




          public void start() {

              log.info("SepaManager started");



          public void stop() {

              log.info("SepaManager stoped");







      Thanks for any help