Tomcat Configuration Details

Tomcat Support

SAS AppDev Studio 4.4 continues to support Tomcat as a servlet container for testing SAS web applications. But because Tomcat is not officially supported by SAS 9.4, Tomcat is recommended only for initial functional testing.
Final acceptance testing should be done with an installed SAS Web Application Server. Because the SAS Web Application Server is based on a version of the VMware vFabric tc Server that is using Tomcat 7, only Tomcat 7 is supported by SAS AppDev Studio when testing. For compatibility, Tomcat 7.0.30 or later is recommended.

Configuring a Tomcat Server

If you have multiple SAS 9.4 BI installations that you want to test against, you can use the Configure for SAS AppDev Studio Use menu command on the pop-up menu for Tomcat 7 servers in the Servers view. The command can add, update, or remove the configuration changes required for a Tomcat 7 server to run against the BI installation identified by the chosen SAS BI Server Profile. To configure a Tomcat 7 server, follow these steps:
  1. In the Servers view, right-click the Tomcat 7 server that you want to configure and select Configure for SAS AppDev Studio Use.
  2. In the dialog box, select the BI Server Profile that you want the server to run against, or check the Remove check box if you want to remove prior configuration changes.
    The OK button is enabled only when a BI Server Profile is selected.
  3. Click OK.
If you configure additional Tomcat 7 servers, you need to update the ports that they use to avoid conflicts. You should also lengthen the start-up time-out from the default of 45 seconds as this can be insufficient time to start even a single SAS web application on some systems. A time-out of at least 120 seconds is recommended. The actual time-out value that you need depend on your hardware and how many SAS web applications you are attempting to start.
Enabling Java security is neither required nor recommended because of performance issues, and is not supported.

Tomcat Shutdown Issue

Tomcat can fail to shutdown. The problem is that when Tomcat is stopped, it waits indefinitely for all deployed web applications to fully clean up before exiting. There is a known issue with stopping deployed SAS Web Application projects while the Web Infrastructure Platform middle tier remains running, preventing the SAS Web Application project from fully cleaning up. When Tomcat fails to shutdown within the stop time-out, a dialog box asks if you want to terminate the process. Terminating Tomcat from this dialog box is the only way stop the server in this situation.
Terminate the Server
The Restart command does not handle the time-out issue well, and leaves the Tomcat process in a permanent “stopping” state without ever displaying the dialog box that asks you if you want to terminate the server. Further, a new Tomcat process is launched while the old Tomcat process is running. The new process runs normally because the old process was able to complete enough of the shutdown to free the ports that it was using. However, the old process continues to run and occupy nearly the same amount of memory that it was using during normal operation. The only way to stop an old Tomcat process is to either restart Eclipse or manually kill the old Tomcat process.
Instead of using the Restart command from the Servers tab or when you confirm a restart when using Run Asthen selectRun on Server, you should separately Stop and then Start the server.
Although some servers might offer you the ability to omit restarting, when a class on the server changes, you should stop and then start the server so that the updated files are picked up by the server. Doing this also avoids potential memory leaks.