dev@glassfish.java.net

Re: StatsProvider: return read-only Statistic object

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Fri, 03 Jul 2009 01:02:06 -0700

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).

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.
>