users@grizzly.java.net
Re: CometContext blocked by client
This message
: [
Message body
] [ More options (
top
,
bottom
) ]
Related messages
: [
Next message
] [
Previous message
] [
In reply to
]
Contemporary messages sorted
: [
by date
] [
by thread
] [
by subject
] [
by author
] [
by messages with attachments
]
From
: Oleksiy Stashok <
oleksiy.stashok_at_oracle.com
>
Date
: Mon, 07 Feb 2011 19:28:23 +0100
Glad to hear that!
Thanks.
WBR,
Alexey.
> 5.23 <
https://hg.imavis.com/centrepoint-trunk/rev/461661f6b26d#l5.23
> CometContext context = engine.getCometContext(topic);
> 5.24 <
https://hg.imavis.com/centrepoint-trunk/rev/461661f6b26d#l5.24
> if (context == null) {
> 5.25 <
https://hg.imavis.com/centrepoint-trunk/rev/461661f6b26d#l5.25
> context = engine.register(topic);
> 5.26 <
https://hg.imavis.com/centrepoint-trunk/rev/461661f6b26d#l5.26
> + context.setBlockingNotification(false);
> 5.27 <
https://hg.imavis.com/centrepoint-trunk/rev/461661f6b26d#l5.27
> + DefaultNotificationHandler nh =
> 5.28 <
https://hg.imavis.com/centrepoint-trunk/rev/461661f6b26d#l5.28
> + (DefaultNotificationHandler) context.getNotificationHandler();
> 5.29 <
https://hg.imavis.com/centrepoint-trunk/rev/461661f6b26d#l5.29
> + nh.setSpreadNotifyToManyToThreads(true);
> 5.30 <
https://hg.imavis.com/centrepoint-trunk/rev/461661f6b26d#l5.30
> context.setExpirationDelay(-1);
> 5.31 <
https://hg.imavis.com/centrepoint-trunk/rev/461661f6b26d#l5.31
> VideoSource videoSource = createVideoSource(req.getPathInfo(), context);
> 5.32 <
https://hg.imavis.com/centrepoint-trunk/rev/461661f6b26d#l5.32
> context.addAttribute("videoSource", videoSource);
>
>
> Now all works fine (we've also synchronized CometContext creation and
> disposition).
>
> Thanks a lot
> WBR
>
> Leonardo
>
>
>> Hi,
>>
>> please try to assign a thread pool to CometEngine, to be able to run
>> handlers asynchronously like:
>>
>> final CometEngine engine = CometEngine.getEngine();
>>
>> ThreadPoolConfig tpConfig = ThreadPoolConfig.DEFAULT.clone()
>> .setCorePoolSize(2)
>> .setMaxPoolSize(5)
>> .setQueueLimit(256);
>> GrizzlyExecutorService ges =
>> GrizzlyExecutorService.createInstance(tpConfig);
>>
>> engine.setThreadPool(ges);
>>
>>
>> WBR,
>> Alexey.
>>
>> PS: assume startComet method is somehow synchronized? ;)
>
>
>
> --
> Leonardo Pecile
> ImaVis S.r.l.
> Via F.lli Carpigiani, 4
> 40138 - Bologna - Italy
> phone: + 39 051 6012120
> fax: +39 051 531666
> web:www.imavis.com
> email:leonardo.pecile_at_imavis.com
This message
: [
Message body
]
Next message
:
goberman_at_msn.com: "Re: Re: Want to migrate from Tomcat Comet to grizzly comet"
Previous message
:
leonardo pecile: "Re: CometContext blocked by client"
In reply to
:
leonardo pecile: "Re: CometContext blocked by client"
Contemporary messages sorted
: [
by date
] [
by thread
] [
by subject
] [
by author
] [
by messages with attachments
]