[jboss-jira] [JBoss JIRA] Updated: (JBAS-3859) Initialization of XMBean attributes doesn't occur

Chris (JIRA) jira-events at jboss.com
Tue Jan 2 04:14:27 EST 2007


     [ http://jira.jboss.com/jira/browse/JBAS-3859?page=all ]

Chris updated JBAS-3859:
------------------------

    Affects Version/s: JBossAS-5.0.0.Beta1

> Initialization of XMBean attributes doesn't occur
> -------------------------------------------------
>
>                 Key: JBAS-3859
>                 URL: http://jira.jboss.com/jira/browse/JBAS-3859
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: JMX
>    Affects Versions: JBossAS-5.0.0.Beta1, JBossAS-4.0.3 SP1, JBossAS-4.0.5.GA
>         Environment: Windows XP, Mac OSX 10.4.8, Java 1.5.0_04, 1.6.0
>            Reporter: Chris
>         Assigned To: Dimitris Andreadis
>
> The Wiki for initializing XMBean values upon deployment (see http://wiki.jboss.org/wiki/Wiki.jsp?page=HowCanIInitializeXMBeanAttributes) suggests 2 ways to set the initial value. One is to use a <descriptor>, the other is to use a plain <value> tag. This has been confirmed to be the way it should work by Dimitris (see forum thread).
> I have tried both ways on JBoss 4.0.3, 4.0.5, and JBoss 5.0.0 (JEE5_TCK) - using JDK1.5 and JDK 1.6, on XP and also on Mac .... and it does not set the initial value. Instead the value is always the default value "I've got the devil inside me" which comes from the String definition within the class file itself.
> (Incidentally, as an aside, if you change the value in the JMX Console and restart JBoss, then the value is correctly recovered from the persistence store).
> To reproduce,  open the file $JBOSS_HOME\docs\examples\jmx\persistent-service.sar\META-INF\jboss-service.xml
> and edit the file as per the Wiki's suggestion. e.g. for attribute SomeString add a <value> tag as follows:
>          <attribute access="read-write" getMethod="getSomeString" setMethod="setSomeString">
>             <name>SomeString</name>
>             <type>java.lang.String</type>
>             <value>This is my initial value</value> <!-- this line is new -->
>          </attribute>
> Copy this to the $JBOSS_HOME\server\default\deploy\ directory and start JBoss.
> Then view the XMBean using the JMX console:
> http://localhost:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.jmx%3Aservice%3DPersistentServiceExample
> You will see that the value for SomeString is "I've got the devil inside me" from the class definition whereas I would expect it to be "This is my initial value" as taken from the XML file.
> (Incidentally, setting an MBean initial attribute does work, the persistence service example has such a value for SomeElement: 
> "<some-message>Welcome to the Athens 2004, Olympic Games!</some-message>"
> But setting the XMBean initial attribute does not work)
> (Also, if the attribute is changed to read-only then there is no error upon deployment to show that the setting of the value has even been attempted.)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list