-
1. Re: [noob] JMX for remote configuration?
genman Jul 28, 2005 12:30 PM (in response to dhartford)
Yes JMX is the way to go. It so happens that the mail service has its properties read-only, but that's because of how it was written. Take a look at the code in CVS for MailService.java. -
2. Re: [noob] JMX for remote configuration?
dhartford Aug 5, 2005 9:50 AM (in response to dhartford)Hmm...I created a JMX MBean (using xdoclet) and everything seems good. However, when trying to use managed properties, on a server reboot those properties are not persisted.
In my ignorance, what have I missed to be able to remotely configure and persist the configuration (properties/service.xml file) of services for my application?
Thanks, still figuring this out....
-D/** * @author dhartford * @jmx.mbean * name="atest:service=TestService" * extends="org.jboss.system.ServiceMBean" * @jboss.service servicefile="jboss" */ public class TestService extends ServiceMBeanSupport implements TestServiceMBean { public TestService() { } private String whoami; /** @jmx.managed-operation * * @return The string response of helloWorld() * @throws Exception */ public String helloWorld() throws Exception { return "Hello from JMX!"; } /** @jmx.managed-operation * * @return The string response of helloWorld() * @throws Exception */ public String helloUser() throws Exception { return "Hello " + whoami + " from JMX!"; } /** @jmx.managed-attribute * * @return The string response of helloWorld() * @throws Exception */ public String getWhoami() throws Exception { return whoami; } /** @jmx.managed-attribute * * @return The string response of helloWorld() * @throws Exception */ public void setWhoami(String whoamistring) throws Exception { this.whoami = whoamistring; } }
-
3. Re: [noob] JMX for remote configuration?
dhartford Aug 5, 2005 4:37 PM (in response to dhartford)I'm not liking this so far...I can read and write to a property file - if I do it programatilly in the MBean code but not via any other means.
I'm also concerned about how configurations are handled in Jboss - mail-service.xml is a managed resource, but so is hsql-ds.xml -- so why are they so different file-wise and mbean-wise?
If you had to change the server location of either the mail service or the database service, should it be so different?
-D -
4. Re: [noob] JMX for remote configuration?
genman Aug 8, 2005 6:14 PM (in response to dhartford)
dhartford, start a new thread for a new topic. This is called "thread hijacking"