Home » Eclipse Projects » Remote Application Platform (RAP) » User UICallBack Problem
User UICallBack Problem [message #487693] |
Thu, 24 September 2009 03:40  |
Eclipse User |
|
|
|
Hi All,
My RAP application uses UICallBack Mechanism to asynchronously update
the browser UI from a server thread.Because I need to use this
UICallBack mechanism in different places in my application,so I add some
code in IEntryPoint's createUI method:
final String codeId=String.valueOf(display.hashCode());
RWT.getSessionStore().addSessionStoreListener(new SessionStoreListener() {
public void beforeDestroy(SessionStoreEvent event) {
UICallBack.activate(codeId);
// release resources
}
});
UICallBack.activate(codeId);
But I find that the beforeDestroy method never be called at the session
invalidated,and the UIThread Object didn't destroy.I can find there are
many UIThread in the JVM by the jconsole tool.
But if I remove the UICallBack.activate(codeId); line code,the
beforeDestroy method would be call and the UIThread object would be
destroyed.
I also add the code in the org.eclipse.rap.demo's createUI method,the
result is the same.
By the way,I use lRAP1.2RC4.
is it a bug in UICallBack mechanism,how can i fix the problem?
Theanks
Cheney
|
|
|
Re: User UICallBack Problem [message #487840 is a reply to message #487693] |
Thu, 24 September 2009 10:34   |
Eclipse User |
|
|
|
Cheney,
I can reproduce what you describe. It may be related to this bug:
214464: [UICallback] Unable to close equinox if activated
https://bugs.eclipse.org/bugs/show_bug.cgi?id=214464
However, I can only reproduce the problem in Jetty (version 6.1.x,
others I don't know). In Tomcat a session is invalidated regardless
whether a UICallback is active or not.
Are you using Jetty for your production system?
Cheers,
Rüdiger
Cheney wrote:
> Hi All,
>
> My RAP application uses UICallBack Mechanism to asynchronously update
> the browser UI from a server thread.Because I need to use this
> UICallBack mechanism in different places in my application,so I add some
> code in IEntryPoint's createUI method:
>
> final String codeId=String.valueOf(display.hashCode());
> RWT.getSessionStore().addSessionStoreListener(new SessionStoreListener() {
>
> public void beforeDestroy(SessionStoreEvent event) {
> UICallBack.activate(codeId);
> // release resources
> }
> });
> UICallBack.activate(codeId);
>
> But I find that the beforeDestroy method never be called at the session
> invalidated,and the UIThread Object didn't destroy.I can find there are
> many UIThread in the JVM by the jconsole tool.
>
> But if I remove the UICallBack.activate(codeId); line code,the
> beforeDestroy method would be call and the UIThread object would be
> destroyed.
>
> I also add the code in the org.eclipse.rap.demo's createUI method,the
> result is the same.
>
> By the way,I use lRAP1.2RC4.
>
> is it a bug in UICallBack mechanism,how can i fix the problem?
>
> Theanks
> Cheney
|
|
|
Re: User UICallBack Problem [message #487952 is a reply to message #487840] |
Thu, 24 September 2009 22:39   |
Eclipse User |
|
|
|
Hi Rüdiger,
Thanks for your reply.
Yes,I use Jetty 6.1.5 for my application.
Because I know that deploy the RAP application and enable equinox osgi
console on tomcat/linux, it would flood the tomcat logs with "osgi>"
prompts(I don't test the last release tomcat, if you know the problem is
fixed in the last release, please tell me, and i also try to test it).
Thanks for your help again! I will try to deploy my rap application in
tomcat container.
Best Regards,
Cheney
Rüdiger Herrmann wrote:
> Cheney,
>
> I can reproduce what you describe. It may be related to this bug:
> 214464: [UICallback] Unable to close equinox if activated
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=214464
> However, I can only reproduce the problem in Jetty (version 6.1.x,
> others I don't know). In Tomcat a session is invalidated regardless
> whether a UICallback is active or not.
> Are you using Jetty for your production system?
>
> Cheers,
> Rüdiger
>
>
> Cheney wrote:
>> Hi All,
>>
>> My RAP application uses UICallBack Mechanism to asynchronously update
>> the browser UI from a server thread.Because I need to use this
>> UICallBack mechanism in different places in my application,so I add
>> some code in IEntryPoint's createUI method:
>>
>> final String codeId=String.valueOf(display.hashCode());
>> RWT.getSessionStore().addSessionStoreListener(new
>> SessionStoreListener() {
>> public void beforeDestroy(SessionStoreEvent event) {
>> UICallBack.activate(codeId);
>> // release resources
>> }
>> });
>> UICallBack.activate(codeId);
>>
>> But I find that the beforeDestroy method never be called at the
>> session invalidated,and the UIThread Object didn't destroy.I can find
>> there are many UIThread in the JVM by the jconsole tool.
>>
>> But if I remove the UICallBack.activates(codeId); line code,the
>> beforeDestroy method would be call and the UIThread object would be
>> destroyed.
>>
>> I also add the code in the org.eclipse.rap.demo's createUI method,the
>> result is the same.
>>
>> By the way,I use lRAP1.2RC4.
>>
>> is it a bug in UICallBack mechanism,how can i fix the problem?
>>
>> Theanks
>> Cheney
|
|
| |
Re: User UICallBack Problem [message #488217 is a reply to message #487969] |
Fri, 25 September 2009 21:45  |
Eclipse User |
|
|
|
Hi Stefan,
Thanks for your reply.
Yes,this issue is solved,I have tested my application (use rap1.2RC4
target platform) in tomcat yestaday.
Best Regards,
Cheney
Stefan Roeck wrote:
> I think this issue is solved since Eclipse 3.4. At least, I haven't had
> any problems with -console since that version.
>
>> Because I know that deploy the RAP application and enable equinox osgi
>> console on tomcat/linux, it would flood the tomcat logs with "osgi>"
>> prompts(I don't test the last release tomcat, if you know the problem
>> is fixed in the last release, please tell me, and i also try to test it).
>>
>
>
>
> Regards,
> Stefan.
|
|
|
Goto Forum:
Current Time: Sat Jul 12 18:29:06 EDT 2025
Powered by FUDForum. Page generated in 0.04504 seconds
|