Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » User UICallBack Problem
User UICallBack Problem [message #487693] Thu, 24 September 2009 07:40 Go to next message
Cheney is currently offline CheneyFriend
Messages: 9
Registered: July 2009
Junior Member
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 14:34 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
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] Fri, 25 September 2009 02:39 Go to previous messageGo to next message
Cheney is currently offline CheneyFriend
Messages: 9
Registered: July 2009
Junior Member
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 #487969 is a reply to message #487952] Fri, 25 September 2009 06:41 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
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.
Re: User UICallBack Problem [message #488217 is a reply to message #487969] Sat, 26 September 2009 01:45 Go to previous message
Cheney is currently offline CheneyFriend
Messages: 9
Registered: July 2009
Junior Member
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.
Previous Topic:Composite#computeSize produces faults between 5 and 10 percent. Bug?
Next Topic:Performance issue
Goto Forum:
  


Current Time: Fri Apr 19 09:28:51 GMT 2024

Powered by FUDForum. Page generated in 0.02012 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top