John Franey [
http://community.jboss.org/people/jjfraney] created the discussion
"@Server, xmbean and attribute persistence?"
To view the discussion, visit:
http://community.jboss.org/message/571432#571432
--------------------------------------------------------------
Hi,
Using jboss 5.1.0.GA.
Can I expect that attribute persistence will work when I use the @Service annotation?
I can't verify that it works.
I look into the server/default/data directory after using the jmxconsole to set an
attribute on my service, no change there.
Logs from the org.jboss.mx.persistence show when I set attributes in the
AttributePersisenceService (versionTag), but no log shows when I set attributes on my
service.
Using a debugger, I see a different call path between setting attributes on my service vs
AttributePersistenceService.
So, I'm thinking there is something extra I need to do here. Any suggestions?
Thanks,
Here is mbean class:
@Service(objectName=GlowpointManagerMBean.OBJECT_NAME,
xmbean="resource:META-INF/glowpoint-xmbean.xml")
@Remote(GlowpointManager.class)
public class GlowpointManagerMBean implements GlowpointManager {
public static final String
OBJECT_NAME="telepresence:service=GlowpointIntegrationManager";
@Service(objectName=XXXManagerMBean.OBJECT_NAME,
xmbean="resource:META-INF/xxx-xmbean.xml")
@Remote(XXXManager.class)
public class XXXManagerMBean implements XXXXManager {
public static final String OBJECT_NAME="sample:service=XXXManager";
....
}
here is xxx-xmbean.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mbean PUBLIC
"-//JBoss//DTD JBOSS XMBEAN 1.1//EN"
"
http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_1.dtd
http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_1.dtd">
<mbean>
<description>This mbean allows for manual control and
configuration</description>
<descriptors>
<persistence persistPolicy="OnUpdate"/>
<persistence-manager
value="org.jboss.mx.persistence.DelegatingPersistenceManager"/>
</descriptors>
<class>com.company.XXXManagerMBean</class>
<attribute access="read-write" getMethod="getSyncInterval"
setMethod="setSyncInterval">
<description>Specifies interval in minutes between sync</description>
<name>SyncInterval</name>
<type>long</type>
<descriptors>
<descriptor name="persistPolicy" value="OnUpdate"/>
</descriptors>
</attribute>
</mbean>
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/571432#571432]
Start a new discussion in EJB3 at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]