Hi,
I created a small XMBean with only one attribute. Unfortunately it's content is never
persisted ... I don't know what I'm doing wrong :(
Here the code:
/*
* Created on 03.06.2004
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package de.cware.cweb.framework.config;
import java.io.Serializable;
import org.dom4j.Document;
import org.jboss.system.ServiceMBeanSupport;
/**
* This class is a JMX bean, which can be accessed and controlled from the
* J2EE server's JMX console, assuming there is one.
*
* @jmx.mbean name="de.cware.cweb.framework.config:service=TestConfigService"
* description="An MBean that handles a services configuration data"
* extends="org.jboss.system.ServiceMBean"
* persistLocation="${jboss.server.data.dir}/cweb/"
* persistName="test.ser"
* state-action-on-update="restart"
*
persistence-manager="org.jboss.mx.persistence.ObjectStreamPersistenceManager"
*
* @jboss.service servicefile="jboss"
* @jboss.xmbean
*/
public class Configuration extends ServiceMBeanSupport implements Serializable {
private Document config;
/**
* Default constructor
* @jmx:managed-constructor description="Default constructor"
*/
public Configuration() {
}
/**
* Get configuration data
* @jmx.managed-attribute
* access="read-write"
* persistPolicy="OnUpdate"
* description="Get configuration data"
*/
public Document getConfiguration() {
return this.config;
}
/**
* @jmx.managed-attribute
*/
public void setConfiguration(Document config) {
this.config = config;
}
}
Chris
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3839209#3839209
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839209
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user