dev@glassfish.java.net

Re: StatsProvider: return read-only Statistic object

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Mon, 06 Jul 2009 10:01:06 -0700

Very good, and let me know when we've done that thanks.

On Jul 5, 2009, at 6:55 PM, Sreenivas Munnangi wrote:

> Jerome Dochez wrote:
>
>> We will not build glassfish-api separatly, not sure what you are
>> referring to here.
>> for this particular problem, I don't see much choice but move
>> those interfaces to a module usable by the ORB both at compile
>> time and runtime.
>> gf-proble-client seems to be the right mode, but I think it should
>> be renamed to gf-commons-api or something is that spirit as it
>> will quickly evolved into a set of APIs that we deliver both in
>> JDK and GlassFish (and we want that set to be as minimal as
>> possible).
>>
> OK, I'll work with Ken and move the stats api/impl to Gmbal similar
> to gf-proble-client.
>
>> jerome
>>
>> On Jun 29, 2009, at 10:44 AM, Marina Vatkina wrote:
>>
>>> Moving this to the dev alias.
>>>
>>> -marina
>>>
>>> Sreenivas Munnangi wrote:
>>>
>>>> Ken Cavanaugh wrote:
>>>>
>>>>>
>>>>> On Jun 27, 2009, at 3:35 AM, Jennifer Chou wrote:
>>>>>
>>>>>> When creating StatsProviders....
>>>>>>
>>>>>> Please make sure the statistic getter methods return the read-
>>>>>> only Statistic object instead of the StatisticImpl.
>>>>>> This applies to all the Statistics, like
>>>>>> org.glassfish.api.statistics.CountStatistic, TimeStatistic,
>>>>>> RangeStatistic, BoundedRangeStatistic. Use the statistics
>>>>>> from glassfish-api.
>>>>>> Do this by calling getStatistic() on the StatisticImpl.
>>>>>> I just made this change in HttpServiceStatsProvider and the
>>>>>> other StatsProviders in web/admin.
>>>>>>
>>>>>> @ManagedAttribute(id="requestcount")
>>>>>> @@ -102,7 +102,7 @@
>>>>>> public CountStatistic getRequestCount() {
>>>>>> CountStatisticImpl requestCount = new
>>>>>> CountStatisticImpl("RequestCount", "count", "Cumulative number
>>>>>> of requests processed so far");
>>>>>> requestCount.setCount(requestProcessTime.getCount());
>>>>>> - return requestCount;
>>>>>> + return requestCount.getStatistic();
>>>>>> }
>>>>>>
>>>>>> Thanks,
>>>>>> Jennifer
>>>>>
>>>>>
>>>>>
>>>>> Is glassfish-api built independently of the rest of GFv3?
>>>>> Otherwise I can't use it in the ORB.
>>>>
>>>> Jerome indicated about building glassfish-api separately, I
>>>> request him to update us on current status.
>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Ken.
>>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

Lloyd Chambers
lloyd.chambers_at_sun.com
GlassFish Team