NEF supports the notion of runtime environments like Development, Testing, and Production. When in the Development environment, XML-based resource files like dialogs, schemas, SQL, and others are automatically reloaded. In Testing and Production environments automatic reloading is not enabled. Your applications can use the environment setting to make appropriate decisions about data sources and other environment-specific settings (like throwing exceptions in a development environment but e-mailing errors in testing or production). The following environment flags are available (they can be mixed but some mixtures won't make sense):
This is the default environment in which all components like dialogs, queries, and such are reloaded when their sources change. This is the only runtime environment in which files are reloaded.
Specifies a test environment.
Specifies a training environment.
Specifies a production environment.
Specifies a demonstration environment.
Specifies that whichever environment is currently the active one is undergoing maintenance. This is useful so that controller servlets don't allow use of application resources while the app is undergoing maintenance.
The active runtime environment may be viewed by going to the Console Home Page for the application in question. The current runtime environment is available within your Java applications by using the ValueContext.getRuntimeEnvironmentFlags() method from any value context instance like NavigationContext or DialogContext (see the section called “Value Contexts” for more information).

If you'd like to modify the runtime environment flags, do the following:
Open your application's web.xml file (WEB-INF/web.xml).
Add or modify the com.netspective.sparx.navigate.CONTROLLER_SERVLET_OPTIONS servlet init parameter for your application's navigation controller. The parameter may be set to a single value or may contain multiple flags separated using the '|' character.
Example 3.7. Changing Application Runtime Environment Flags to Production
<web-app>
...
<servlet>
<servlet-name>SparxNavigationController</servlet-name>
<servlet-class>com.netspective.sparx.navigate.NavigationControllerServlet</servlet-class>
<init-param>
<param-name>com.netspective.sparx.navigate.CONTROLLER_SERVLET_OPTIONS</param-name>
<param-value>--runtime-environment=PRODUCTION</param-value>
</init-param>
</servlet>
...
</web-app>Example 3.8. Changing Application Runtime Environment Flags to Production Maintenance
<web-app>
...
<servlet>
<servlet-name>SparxNavigationController</servlet-name>
<servlet-class>com.netspective.sparx.navigate.NavigationControllerServlet</servlet-class>
<init-param>
<param-name>com.netspective.sparx.navigate.CONTROLLER_SERVLET_OPTIONS</param-name>
<param-value>--runtime-environment="PRODUCTION | UNDERGOING_MAINTENANCE"</param-value>
</init-param>
</servlet>
...
</web-app>![]() | Note |
|---|---|
To learn more about the other controller servlet options allowed by Sparx, visit Console's -> page. | |