users@grizzly.java.net

Re: more questions

From: Cam Bazz <cambazz_at_gmail.com>
Date: Fri, 4 Jul 2008 06:02:34 +0300

great! thanks a lot !

On Fri, Jul 4, 2008 at 5:10 AM, Jeanfrancois Arcand <
Jeanfrancois.Arcand_at_sun.com> wrote:

> Salut,
>
> I've committed the fix. GlassFish v2 build 41 (upcoming build) will have
> it. You can download 1.0.21
>
> http://download.java.net/maven/1/grizzly/jars/
>
> You have to update your ${glassfish.home}/lib/appserv-rt.jar with the
> content of 1.0.21:
>
> % cd lib
> % unzip grizzly-1.0.21.jar
> % jar uvf appserv-rt.jar com
>
> and the restart GlassFish
>
> Have fun :-)
>
> -- Jeanfrancois
>
>
>
> Cam Bazz wrote:
>
>> Hello,
>>
>> Could it be possible for me to locally incorparate this
>> getnumberofsessions method, either by subclassing or modifying the source of
>> the 1.0.20?
>>
>> Best,
>> -C.A.
>>
>> On Wed, Jul 2, 2008 at 7:02 PM, Jeanfrancois Arcand <
>> Jeanfrancois.Arcand_at_sun.com <mailto:Jeanfrancois.Arcand_at_sun.com>> wrote:
>>
>>
>>
>> Cam Bazz wrote:
>>
>>
>>
>> yes it will be greatly helpful if you could add them also to the
>> 1.0.20
>>
>> I need the list of comet handlers so once can get the number of
>> current users. since there is no practical way of getting number
>> of open sessions in glassfish.
>>
>>
>> OK I've filled this:
>>
>> https://grizzly.dev.java.net/issues/show_bug.cgi?id=179
>>
>> will work on it as soon as possible.
>>
>>
>>
>>
>> If I were to keep a list of handlers myself, I would do that
>> inside the doGet method where we create a new handler, right?
>>
>>
>> Yes.
>>
>>
>>
>>
>> and also where do I grab the comethandler id at creation time?
>>
>>
>> Yes
>>
>> :-)
>>
>> -- Jeanfrancois
>>
>>
>>
>>
>>
>> Best.
>>
>>
>> On Wed, Jul 2, 2008 at 6:53 PM, Jeanfrancois Arcand
>> <Jeanfrancois.Arcand_at_sun.com
>> <mailto:Jeanfrancois.Arcand_at_sun.com>
>> <mailto:Jeanfrancois.Arcand_at_sun.com
>> <mailto:Jeanfrancois.Arcand_at_sun.com>>> wrote:
>>
>> Salut,
>>
>>
>> Cam Bazz wrote:
>>
>> Hello,
>>
>> I have included the grizzly 1.20 jar and removed the
>> appserv-rt.jar and the problem of intterrupt not firing
>> is gone.
>>
>> now these problems are solved, I can do more advanced comet
>> kung-foo.
>>
>>
>> LOL...Great!
>>
>>
>>
>>
>> I am curious in the following three subjects:
>>
>> a. how can I notify a specific comet lisnener? right now I
>> am
>> notifying everyone with context.notify(null);
>>
>>
>> Use this CometContext API:
>>
>> 6 /**
>> 457 * Notify a single {_at_link CometHandler}. The
>> attachment
>> can be null.
>> 458 * The <code>type</code> will determine which
>> code>CometHandler</code> 459 * method will be invoked:
>> 460 * <pre><code>
>> 461 * CometEvent.INTERRUPT ->
>> <code>CometHandler.onInterrupt</code>
>> 462 * CometEvent.NOTIFY ->
>> <code>CometHandler.onEvent</code>
>> 463 * CometEvent.INITIALIZE ->
>> <code>CometHandler.onInitialize</code>
>> 464 * CometEvent.TERMINATE ->
>> <code>CometHandler.onTerminate</code>
>> 465 * CometEvent.READ ->
>> <code>CometHandler.onEvent</code>
>> 466 * </code></pre>
>> 467 * @param attachment An object shared amongst {_at_link
>> CometHandler}. 468 * @param type The type of
>> notification.
>> 469 * @param cometHandlerID Notify a single
>> CometHandler.
>> 470 */
>> 471 public void notify(final E attachment,final int
>> eventType,final int cometHandlerID)
>>
>>
>>
>> b. what kind of datastructure must be used to track users
>> connected?
>>
>>
>> You need to maintain your own list of CometHandler...but can you
>> gives me more information about why you need access those
>> CometHandler> I'm asking because I think it should be a good
>> idea to
>> have a public API on CometContext to get the current list of
>> connected users. Something like:
>>
>> public List<CometHandler> getCometHandlers();
>>
>>
>>
>> c. is there anyway to get the number of total long
>> polling clients?
>>
>>
>> Another reason to add the getCometHandlers() :-) So far there
>> is no
>> such API available.
>>
>> I can add that API to Grizzly 1.0.20 and 1.8.0.1
>> <http://1.8.0.1> <http://1.8.0.1> if
>>
>> you think that will be useful.
>>
>> Thanks,
>>
>>
>> -- Jeanfrancois
>>
>>
>>
>> Best,
>>
>> -C.B.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> users-unsubscribe_at_grizzly.dev.java.net
>> <mailto:users-unsubscribe_at_grizzly.dev.java.net>
>> <mailto:users-unsubscribe_at_grizzly.dev.java.net
>> <mailto:users-unsubscribe_at_grizzly.dev.java.net>>
>>
>> For additional commands, e-mail:
>> users-help_at_grizzly.dev.java.net
>> <mailto:users-help_at_grizzly.dev.java.net>
>> <mailto:users-help_at_grizzly.dev.java.net
>> <mailto:users-help_at_grizzly.dev.java.net>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> <mailto:users-unsubscribe_at_grizzly.dev.java.net>
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>> <mailto:users-help_at_grizzly.dev.java.net>
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>