Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 291295

Summary: When I exit the application using System.exit(0), the client reports "The server seems to be temporarily unavailable. Would you like to retry?" message.
Product: [RT] RAP Reporter: liyongft
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description liyongft CLA 2009-10-04 11:01:20 EDT
User-Agent:       Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8)
Build Identifier: RAP 1.2

When I exit the application using System.exit(0), the client reports "The server seems to be temporarily unavailable. Would you like to retry?" message.

I have tried many ways to gracefully shutdown RAP application, so far, I always get this message after server is shutdown. 

How to avoid this message in IE/Firefox?

Reproducible: Always

Steps to Reproduce:
1. Create a simple RAP application
2. In the RAP application, add a button like Exit
3. In the event handler of Exit button, do something like:
System.exit(0)
4. Observes the client behavior. The server app is down, but the client side will say: "The server seems to be temporarily unavailable. Would you like to retry?" 

I would like to avoid this message.
Comment 1 Stefan Röck CLA 2009-10-05 03:57:34 EDT
Uh, System.exit() terminates the VM - not sure if that's your intention.
There has been a discussion in the Newsgroup on how to let a session become invalid - one solution is to call RWT.getRequest().getSession().setMaxInactiveInterval(1).
System.exit() is definitely the wrong way.
Comment 2 Rüdiger Herrmann CLA 2009-10-05 05:49:12 EDT
See comment #1
Comment 3 liyongft CLA 2009-10-05 20:05:22 EDT
Thank you!

In my specific use case, I do want to exit the whole JVM if user chooses to shutdown the application, that's why System.exit(0) is chosen. I understand your concern, under most circumstances, this is not correct approach, i.e., you do not want to bring WebSphere done just because you want to shutdown this RAP app.

I will try RWT.getRequest().getSession().setMaxInactiveInterval(1) to see whether it will solve the client session issue though.