[jboss-jira] [JBoss JIRA] (AS7-5905) Use ServiceLoader to locate mod_cluster custom load metrics
Radoslav Husar (JIRA)
jira-events at lists.jboss.org
Mon Dec 3 14:22:21 EST 2012
[ https://issues.jboss.org/browse/AS7-5905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739036#comment-12739036 ]
Radoslav Husar commented on AS7-5905:
-------------------------------------
@[~brian.stansberry]
{quote}
It may help, but for custom metrics, unless the user edits module.xml (bad!!!!) to add a dependency there needs to a mechanism to identify the module of the metric. Otherwise there is no way to access the module. What's there now seems to be wrong in this respect.
{quote}
I totally agree it's bad. AFAIK there isn't another reasonable mechanism to do it, is there? Just dropping a JAR somewhere would be much more usable.
{quote}
If more than one metric is available via ServiceLoader, how will the desired one be identified?
{quote}
The idea here is that ServiceLoader will load all factory classes for a load metrics. Each factory is identifiable by String name ( say something like String getId(); ). Factory knows how to constract that particular LoadMetric class and users don't have to specify FQCN in the AS configuration. WDYT?
> Use ServiceLoader to locate mod_cluster custom load metrics
> -----------------------------------------------------------
>
> Key: AS7-5905
> URL: https://issues.jboss.org/browse/AS7-5905
> Project: Application Server 7
> Issue Type: Feature Request
> Components: Clustering
> Reporter: Radoslav Husar
> Assignee: Radoslav Husar
> Fix For: 7.2.0.Alpha1
>
>
> Solves the problem of having to identify load metrics by class names.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list