dev@glassfish.java.net

Re: StatsProvider: return read-only Statistic object

From: Ken Cavanaugh <Ken.Cavanaugh_at_Sun.COM>
Date: Fri, 03 Jul 2009 08:50:40 -0700

On Jul 3, 2009, at 8:36 AM, Lloyd Chambers wrote:

> Jerome,
>
> Could you elaborate on what is going into the JDK and when and why?

For example, if we decide to put the GlassFish ORB into JDK 7, we need
to have
things like the stats APIS (at least) available outside of GlassFish.
This probably also applies to some of the XML-related code as well.

I think putting these into gf-probe-client (currently built in my
Gmbal workspace)
is a reasonable approach, and something like gf-commons-api make
sense as well.

Ken.

>
> Lloyd
>
> On Jul 3, 2009, at 1:02 AM, 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).
>>
>> 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
>
>
>