Skip navigation.
Downloads | Product Documentation | Support

Using WSRP with WebLogic Portal

# Monitoring and Logging Remote Portlet Performance

You can monitor activity between Producers and Consumers by using the message monitor servlet installed with WebLogic Workshop. You can also create custom logs to display specific information about WSRP sessions.

This section contains information on these subjects:

- Monitoring Producer/Consumer Message Logs
- Creating Custom Logs

# Monitoring Producer/Consumer Message Logs

By default, the message monitor is enabled in the `web.xml` file, as shown in Listing 5-1.

Listing 5-1 Enabling Message Monitor in web.xml

>     <!-- WSRP Message Monitor Servlet -->
>     <servlet>
>        <servlet-name>com.bea.wsrp.logging.MessageMonitor</servlet-name>
>        <servlet-class>com.bea.wsrp.logging.MessageMonitor</servlet-class>
>        <init-param>
>           <param-name>enableSoapMessageLogging</param-name>
>           <param-value>true</param-value>
>        </init-param>
>           <load-on-startup>1</load-on-startup>
>     </servlet>

You easily monitor the messages regarding Producer/Consumer interaction by viewing output of this servlet. To do, use this procedure:

1. Ensure that a WSRP session running (that is, a Consumer portlet is surfacing data from a Producer).
2. Open a new browser.
3. In the new browser's address bar, type the following:

>     <host_name>:<port_number>/<webProject_name>/monitor

Where:

- `<host_name>`:`<port_number>` is the host and port you want to monitor.
- `<webProject_name>` is the web project you want to monitor.

For example:

>     localhost:7001/wsrpMonitorTest/monitor

The Monitor appears in the browser, as shown in Figure 5-1.

Figure 5-1 Monitor Appearing in a Browser

Each time the remote portlet communicates with the Producer, a request-response message header appears on the monitor screen (Figure 5-2).

Figure 5-2 Monitor Message

- By clicking Show, you can display the content of the request or the response (Figure 5-3).

Figure 5-3 Message Content

- Click Hide to close the message content.

# Creating Custom Logs

You can create custom logs that display particular information about a WSRP session by using the WebLogic Server `loggers` and `handlers`. These objects allow you to create your own message handlers and subscribe them to the WebLogic Server `Logger` objects; for example, if you want the remote portlet to listen for the messages that the Producer generates, you can create a `handler` and subscribe it to the `Logger` object in the Producer.

`loggers` and `handlers` are WebLogic Server objects. For instructions on using them to create custom logs for your WSPR Consumers and Producers, please refer to Subscribing to Messages at:

>     http://e-docs.bea.com/wls/docs81/logging/listening.html#1176551