EAServer generates profiling and tracing code for deployed business and Web components.
Tracing is off by default and must be enabled in server properties and in the code generation options for EJB or Web modules. To enable tracing in server properties, configure the Enable EJB Trace and Enable Web Trace options in the server properties as described in “Log/Trace tab” in Chapter 3, “Creating and Configuring Servers,” in the System Administration Guide. To enable or disable tracing for EJB and Web components, configure the following properties in the user configuration script for the module:
For EJB components, the ejb.enableTracing Ant property globally enables or disables generation of tracing code for all components in the module. To disable or enable for a specific component, override the <setProperties> task for the component in the user-configuration script and set the nested <tracePublicMethods> property. For example:
<target name="configure-user"> <setProperties component="ejb.components.myjar.MyCompRemote"> <tracePublicMethods enable="true"/> </setProperties> </target>
For Web components, the web.enableTracing Ant property globally enables or disables generation of tracing code for all components in the Web application. You can override the setting for individual Web components using the same syntax shown above for EJB components.
To enable profiling of deployed components, you must enable generation of profiling code and not disable statistics collection in the server properties. Generation of profiling code is enabled by default in deployed components. The following properties can be changed in the generated configuration scripts to enable or disable generation of profiling code:
For EJB components, the ejb.enableProfiling Ant property globally enables or disables generation of profiling code for all components in the module. To disable or enable for a specific component, override the <setProperties> task for the component in the user-configuration script and set the nested <profilePublicMethods> property. For example:
<target name="configure-user"> <setProperties component="ejb.components.myjar.MyCompRemote"> <profilePublicMethods enable="true"/> </setProperties> </target>
For Web components, the web.enableProfiling Ant property globally enables or disables generation of profiling code for all components in the Web application. You can override the setting for individual Web components using the same syntax shown above for EJB components.
In server properties, the Disable Statistics (disableStatistics) property must be false to allow collection of profiling statistics.
If you change the profiling or tracing settings for an EJB or Web module, recompile the module and restart the server for the change to take affect. If you change the server Disable Statistics, Enable Web Tracing, or Enable EJB Tracing properties, restart the server for the change to take affect.
When tracing or profiling is enabled, you can view statistics in the Web console or with a Web connection from your spreadsheet software. For more information, see “Viewing server statistics” in Chapter 11, “Runtime Monitoring,” the System Administration Guide.