[jbosstools-issues] [JBoss JIRA] (JBIDE-24280) Support converted types in JolokiaMBeanServerConnection

Aurélien Pupier (JIRA) issues at jboss.org
Tue Apr 18 03:20:00 EDT 2017


    [ https://issues.jboss.org/browse/JBIDE-24280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13394232#comment-13394232 ] 

Aurélien Pupier commented on JBIDE-24280:
-----------------------------------------

{quote}This has the potential to be a pretty huge endeavor. A lot of jmx returned types are classes that are not available in eclipse or on the classpath. This would basically require temporarily loading jars on the classpath to generate these objects. I'm not sure to what extent this is a good idea.
{quote}

The purpose of this JIRA is not for classes defined in extra libraries. For stuff defined in extra libraries it will be required to be handled in Jolokia itself. Having a requirement of the class on the client side classpath seems fien for me, i think that it is the same for RMI connection.

Anyway, the prupose here is to provide the correct type for "converted" type due to some basic limitatiosn of JSON, for instance:
- all numerics Integer, Double, BigInteger are converted to long
- Date are converted to long timestamp
- Set are converted to List

As we can retrieve the exact type, it is possible to convert back to the correct type.
it would be even nicer to ghave it directly in the java jolokia client but it would break the API and so can be done only in a Jolokia 2.0 version.

{quote}
Since this is blocking other issues we really should discuss how important this is for you?
{quote}

Currently, I detected few values not displayed in properties due to this issue for which I'm not sure a workaround is easily possible because reflection is used to retrieve elements. Implementing this improved behavior in JolokiaMBeanServerConnection would be far easier and will benefit to everyone.
I don't think that i will have time to work on it for 4.4.4 but I think that it can wait for the first Oxygen release and we will mention as "know issues" in release notes.
On the other hand, I think that a minimal implementation for Integer, Date and Set might be sufficient for Camel use case (at least i have not detected other cases currently). So considering only this subset we might be able to integrate it in 4.4.4.


> Support converted types in JolokiaMBeanServerConnection
> -------------------------------------------------------
>
>                 Key: JBIDE-24280
>                 URL: https://issues.jboss.org/browse/JBIDE-24280
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: jmx
>    Affects Versions: 4.4.4.AM2
>            Reporter: Aurélien Pupier
>
> currently if you are trying to invoke methods/get attributes of (returning) type Integer or Date, there is a ClassCastException
> i should be the case for all types converted by Jolokia/Json



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)



More information about the jbosstools-issues mailing list