[JBoss-dev] XMBean and transient attributes

2003-03-29 Thread Scott M Stark
I'm working on updating the xmbean tests in 3.2 to make sure what we will
have in the 3.2.0 release is usable and there is an issue with transient attributes
and the default value for currencyTimeLimit. An attribute element like:

   attribute access=read-write default=jboss.security:service=JaasSecurityManager
  descriptionSecMgr is a read-write attribute added at the metadata level
 for which there is no state in the User2 instance.
  /description
  nameSecMgr/name
  typejavax.management.ObjectName/type
   /attribute

where there is no currencyTimeLimit defined fails to have a value for this attribute,
and a value cannot be set. Given that it has a default value this does not seem like
valid behavior. If the currencyTimeLimit set to -1 then the default value is seen
as the initial value for the attribute and it may be updated.

   attribute access=read-write default=jboss.security:service=JaasSecurityManager
  descriptionSecMgr is a read-write attribute added at the metadata level
 for which there is no state in the User2 instance.
  /description
  nameSecMgr/name
  typejavax.management.ObjectName/type
  descriptors
 currencyTimeLimit value=-1/ 
  /descriptors
   /attribute

The question is why should a failure to specify the attribute descriptors result in
an unusable attribute? Either the caching logic is faulty or the implicit settings for
the attribute descriptors a not correct.




---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


Re: [JBoss-dev] XMBean and transient attributes

2003-03-29 Thread Juha-P Lindfors

it should set the value to -1 in the MBeanAttributeInfo descriptor if no
getMethod fields are specified

 // if no method mapping, enable caching automatically
 if (getMethod == null  currTimeLimit ==
null)
descr.setField(CURRENCY_TIME_LIMIT, -1);

-- Juha


On Sat, 29 Mar 2003, Scott M Stark wrote:

 I'm working on updating the xmbean tests in 3.2 to make sure what we will
 have in the 3.2.0 release is usable and there is an issue with transient attributes
 and the default value for currencyTimeLimit. An attribute element like:

attribute access=read-write 
 default=jboss.security:service=JaasSecurityManager
   descriptionSecMgr is a read-write attribute added at the metadata level
  for which there is no state in the User2 instance.
   /description
   nameSecMgr/name
   typejavax.management.ObjectName/type
/attribute

 where there is no currencyTimeLimit defined fails to have a value for this attribute,
 and a value cannot be set. Given that it has a default value this does not seem like
 valid behavior. If the currencyTimeLimit set to -1 then the default value is seen
 as the initial value for the attribute and it may be updated.

attribute access=read-write 
 default=jboss.security:service=JaasSecurityManager
   descriptionSecMgr is a read-write attribute added at the metadata level
  for which there is no state in the User2 instance.
   /description
   nameSecMgr/name
   typejavax.management.ObjectName/type
   descriptors
  currencyTimeLimit value=-1/
   /descriptors
/attribute

 The question is why should a failure to specify the attribute descriptors result in
 an unusable attribute? Either the caching logic is faulty or the implicit settings 
 for
 the attribute descriptors a not correct.




 ---
 This SF.net email is sponsored by:
 The Definitive IT and Networking Event. Be There!
 NetWorld+Interop Las Vegas 2003 -- Register today!
 http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
 ___
 Jboss-development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development


--
Juha Lindfors
Author of JMX: Managing J2EE with Java Management Extensions




---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development