[jboss-jira] [JBoss JIRA] Commented: (JBAS-6688) expose ManagedProperties representing ObjectNames as SimpleMetaType.STRINGs rather than ImmutableCompositeMetaType{javax.management.ObjectName}s

Ian Springer (JIRA) jira-events at lists.jboss.org
Mon Apr 6 09:48:23 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBAS-6688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12460736#action_12460736 ] 

Ian Springer commented on JBAS-6688:
------------------------------------

Also, when I try to call updateComponent() with any of the ObjectName props set to null, I get an NPE:

Failed to update Resource (see app server log for additional details): java.lang.NullPointerException at org.jboss.metatype.plugins.values.mappers.StringObjectNameMetaMapper.unwrapMetaValue(StringObjectNameMetaMapper.java:67) at org.jboss.metatype.plugins.values.mappers.StringObjectNameMetaMapper.unwrapMetaValue(StringObjectNameMetaMapper.java:42) at org.jboss.system.deployers.managed.ServiceMetaDataICF.setValue(ServiceMetaDataICF.java:280) at org.jboss.system.deployers.managed.ServiceMetaDataICF.setValue(ServiceMetaDataICF.java:58) at org.jboss.managed.plugins.WritethroughManagedPropertyImpl.setValue(WritethroughManagedPropertyImpl.java:102) at org.rhq.plugins.jbossas5.util.ConversionUtils.populateManagedPropertyFromProperty(ConversionUtils.java:277) at org.rhq.plugins.jbossas5.util.ConversionUtils.convertConfigurationToManagedProperties(ConversionUtils.java:248) at org.rhq.plugins.jbossas5.AbstractManagedComponent.updateResourceConfiguration(AbstractManagedComponent.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:449) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) 


This happens whether the MetaValue itself is null or the wrapped Serializable is null.


> expose ManagedProperties representing ObjectNames as SimpleMetaType.STRINGs rather than ImmutableCompositeMetaType{javax.management.ObjectName}s
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBAS-6688
>                 URL: https://jira.jboss.org/jira/browse/JBAS-6688
>             Project: JBoss Application Server
>          Issue Type: Sub-task
>      Security Level: Public(Everyone can see) 
>          Components: ProfileService
>            Reporter: Ian Springer
>            Assignee: Scott M Stark
>            Priority: Minor
>             Fix For: JBossAS-5.1.0.CR1
>
>
> Properties representing ObjectNames in the Topic and Queue ManagedComponents are currently exposed as a complicated CompositeValueSupport type that contains a String and a Properties child value, e.g.:
>   name=serverPeer, viewUse=CONFIGURATION, mandatory=false, value=  CompositeValueSupport: metaType=[ImmutableCompositeMetaType{javax.management.ObjectName items
> =[name=domain type=java.lang.String], [name=keyPropertyList type=java.util.Properties]}] items=[domain=SimpleMetaType:java.lang.String:jboss.messaging,keyProper
> tyList={service=ServerPeer}]
>   Items:
>     domain=SimpleMetaType:java.lang.String:jboss.messaging
>     keyPropertyList={service=ServerPeer}
> I think exposing it as a simple value of type SimpleMetaType.STRING would make things easier for Jopr/EmbJopr, as well as other clients of the management interface. As it's exposed today, just to get it into a usable format, the client would have to write code to convert the CompositeValue into an ObjectName, rather than being able to simply call new ObjectName(simpleValue.getValue()).

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

       




More information about the jboss-jira mailing list