Working with Built-in Pramati Server
Overview
Studio ships with a built-in Pramati Server, which is J2EE 1.3 certified and needs no setup. The built-in Server allows to build and debug J2EE components independently before integrating them with a project. It also enables to view diagnostic data using the Application Analyzer (App Analyzer).
Developers familiar with Pramati Server, can test-deploy their applications on Server via Studio. Studio automatically creates the required deployment descriptors while the application is being developed, and keeps the application in a ready-to-deploy state. It also creates connection pool, data-source, mail resource, connection factories, topics, and queues on the Server.
For more information on configuring server, refer to `Configuring a Development Server'.
What is App Analyzer
Application Analyzer (App Analyzer) diagnostics help to identify and analyze the time taken to complete a logical unit of operation and provide details on the time taken by business operations for execution. It helps in distributing time across various sub-tasks and eliminate bottlenecks at runtime.
Server performs the following functions:
- Monitor and detect: Monitors the complete database environment, analyzes the data, and detects the thresholds that have been exceeded
- Diagnostics: Enables you to find out the reasons why is there a change in the threshold size
The App Analyzer provides application level data profiling such as bean pool wait time and database response wait time. Historical data is available for the performance of both events. The rules engine supports event correlation between different nodes and provides easy customization. The web browser displays the occurring events. This enables to determine the condition of the system.
App Analyzer uses dynamic MBeans that conform to a specific interface and offers great flexibility at runtime, and are easy to implement. Service providers and developers can make their products manageable in a standard way without having to understand or invest in complex management systems. The MBeans generate and propagate notification events to components of the other levels.
This chapter discusses how to develop EJB 1.1 and EJB 2.0 applications using Studio, deploy them on the built-in Server, and use the App Analyzer.
Note: Each configured Server instance has its own tab in the output panel.
Configuring built-in Pramati Server
Built-in Server is configured in Studio by default. To make any changes in the default settings, go to Tools > Server Configuration.
Enter the following data:
- Server Name: In-Built server is selected by default
- Server Type: The type of Server is Pramati In-Built Server 3.5. This field is non-editable
- IP Address: IP address of the machine on which built-in Server is installed and the application will be deployed. The value is 127.0.0.1. This field is non-editable
- Naming Port: Port on which Server listens. Naming port value is 9191. This field is non-editable
- HTTP Port: Port on which the web server listens. HTTP port value is 8181. This field is non-editable
- User Name: User name to start the remote server. Default value is root. This field is non-editable
- Password: Password for specific user is displayed here. Default value is pramati. This field is non-editable
- Realm: The realm to which the Server is assigned. Default value is system. This field is non-editable
- Server Classpath: The server classpath added here applies to the server. Click plus to add the application utility JARs to the classpath. To change the sequence of JARs in the list, use the up and down arrows
- JVM Options: Enter a value or browse through the standard Java options to start Server. No default value is provided. Options are -Xms 64m and -Xms 128m
- Command Line Options: Type a command or browse through the command line options. Command line options enable to start Server, start the deploy tool, deploy and start or stop ready-to-run JAR, WAR and EAR the commands being -startapps,-keep,-nojms
- Trace Level: Select from the available options and enable tracing information during Server execution
- Start JMS Server: Select this option to start the JMS Server along with the built-in Server. The option is unselected by default
- Use Inprocess javac: This option is selected by default. It makes deployment fast. For large applications, unselect the option to avoid Out of Memory error
- Use Inprocess rmic: This option is selected by default. It makes deployment faster. For large applications, unselect the option to avoid Out of Memory error
Click OK to apply changes.
Starting or stopping built-in Server
Use Tools > Start Server to start the Server, and Tools > Stop Server to stop the server. The Server can also be started/stopped using the signal box. By default, the Server box in the Status Bar displays only the built-in Pramati Server, and all applications are deployed on this server.
Deploying applications on built-in Server
Deploy applications on built-in Pramati Server as JARs, WARs, and EARs, or as desk tree nodes and modules. Deploying from the desk tree nodes and modules uses the Express Development feature in Studio.
All applications are by default deployed on the built- in Server.
To deploy on the built- in Server:
- Right click on the desk and select Deploy or Deploy as .ear
- Right click on the module and select Deploy
Note: To deploy entity beans with container managed relationships on Pramati Server, ensure that the corresponding database constraints are defined.
Debugging applications on built-in Server
Debug applications deployed on built-in Server using the Studio Debugger. Studio provides normal, conditional, and remote debug options. JSP debugging assumes that the application has been deployed on the built-in Server.
Using the Application Analyzer
To enable the App Analyzer select Tools > Configure from the main menu. Select Server Diagnostics from the Available Tools list. Click Close. The tool is added as Application Diagnostics to the Tools menu.
The timing diagnostic details available are:
- Transactions: For transactions committed and rolled back
- Datasources: Time taken to connect to the datasources for the applications running on the Server
- Applications: For application modules
To start diagnostics in Studio:
- Select Tools > Application Diagnostics > Start Diagnostics from the main menu.
- Open a desk, right click and select Deploy. The App Analyzer starts diagnostics.
- To stop the App Analyzer, select Tools > Application Diagnostics > Stop Diagnostics from the main menu.
- Read the available Transaction, DataSources, and Application diagnostic data.
Note: For more information on the App Analyzer and interpreting diagnostic data, read `Pramati Server Diagnostics' in the Pramati Server 3.5 Administration Guide.