[jboss-jira] [JBoss JIRA] Commented: (JBAS-6242) invoke() for "listFormattedSubPoolStatistics" ManagedOperation on datasources and connection factory ManagedComponents returns a MetaValue with the wrong MetaType
Adrian Brock (JIRA)
jira-events at lists.jboss.org
Mon Nov 24 13:50:36 EST 2008
[ https://jira.jboss.org/jira/browse/JBAS-6242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12439553#action_12439553 ]
Adrian Brock commented on JBAS-6242:
------------------------------------
In my opinion, what it is doing is correct.
The format of the statistics is determined by the statistics formatter.
Which by default returns a String, but it could return anything.
A collection of JBossSubPoolStatistics would be the most obvious alternative
which would map to a collection of composite types for the same.
You need to be able handle the return type dynamically,
Its called polymorphism which is an integral part of any object orientated language. :-)
i.e. MetaValue returnValue = invoke(...)
MetaType type = returnValue.getMetaType();
// etc.
If you can't handle that, then I'd suggest we add a new method which hardwires the String formatter
with a String return type and only annotate that as a ManagedOperation.
But this issue will come up elsewhere where the return type cannot be constrained so easily.
> invoke() for "listFormattedSubPoolStatistics" ManagedOperation on datasources and connection factory ManagedComponents returns a MetaValue with the wrong MetaType
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBAS-6242
> URL: https://jira.jboss.org/jira/browse/JBAS-6242
> Project: JBoss Application Server
> Issue Type: Sub-task
> Security Level: Public(Everyone can see)
> Components: ProfileService
> Environment: JBAS5 Hudson build dated 200811210604
> Reporter: Ian Springer
> Assignee: Scott M Stark
>
> This is another case of the data not matching the metadata.
> operation.getReturnType() returns a MutableCompositeMetaType w/ typeName java.lang.Object. However, invoke() is returning a SimpleMetaType.STRING (with value e.g. "Sub Pool Statistics: \nSub Pool Count: 0\n------------------------------------------------------\n").
--
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