Streaming quotes setup

This sample contains a working Web application that displays stock quotes in order to demonstrate the Web 2.0 features in this product.

Prerequisites:

  1. Download and install the WAS Feature Pack for Web 2.0 Web messaging enablement fix

  2. Import the sample code into your workspace.

Tip: You can run this tutorial using WebSphere® Application Server Versions 6.1 and 7.0.

Important: These instructions assume that you are using a stand-alone server installation. Instructions may differ in a Network Deployment environment.

To configure the server:

  1. Enable the Web messaging server:

    1. In the Servers view, right-click

      WAS and select

      Start.

    2. Once the server has started, right-click

      WebSphere Application Server and select

      Administration | Run administrative console. The Admin Console opens

    3. Log into the WAS administrative console.

    4. Click

      Servers | Application Servers.

    5. Click the current application server in the Application servers list. The Configuration tab for your application server opens.

    6. In the Container Settings list, expand

      Web Container Settings and click

      Web container transport chains. The Web container transport chains list opens.

    7. Click

      WCInboudDefault or select the transport chain that corresponds to the Virtual Host you will select during the application install. The transport chain represents network protocol stacks that operate within a client or server. The WCInboundDefault Configuration tab opens.

    8. Click

      Web Container Inbound Channel. The Web container inbound channel Configuration tab opens.

    9. Click

      Custom Properties.

    10. Click

      New and type webmsgenabled for the name property and true for the value. Click

      Apply. In the Messages box click

      Save to save the repository information.

    11. You can restart the application server now or wait until after the Configure Service Integration Bus step.

  2. Configure a service integration bus:

    1. Log into the WAS administrative console.

    2. Expand

      Service integration then click

      Buses. The Buses page opens.

    3. Click

      New to create a new bus.

    4. In the name field, type thebus then deselect

      Bus security. Click Next.

    5. On the Confirm create of new bus page, click Finish.

    6. Click

      thebus. The thebus Configuration tab opens.

    7. In the Topology list click

      Bus members. Then click

      Add.

    8. Select the server to which you want to install the application. Click Next.

    9. For the rest of the steps, select the default values then click Finish.

    10. In the Messages box, click

      Save to save the repository information.

    11. In the Servers view, right-click

      WAS v6.1 and select

      Restart.

  3. Create a topic connection factory:

    1. Log into the WAS administrative console.

    2. Click

      Resources | JMS | Topic connection factories. The Topic connection factories page opens.

    3. Expand

      Scope. In the Scope list, select a server level scope.

    4. Click

      New. Select

      Default messaging provider then click OK.

    5. In the name field, type QuoteStreamer.

    6. In the JNDI name field, type jms/QuotePublish.

    7. In the Bus name field, select thebus.

    8. Click

      Apply, then click

      Save to save the repository information.

  4. Run the sample on server:

    1. In Enterprise Explorer, right-click

      QuoteStreamer and select

      Run As | Run on Server. The

      Run On Server window opens.

      Tip:

      When running

      index.html on server, the default URL uses

      https:// with a secure port, for example 9443. In the Web address box, change the URL to http:// with a non-secure port, for example 9082. To find a non-secure HTTP port:

      1. Log into the WAS administrative console.

      2. Click

        Servers | Application Servers.

      3. Select the target server.

      4. In the Communications list, click

        Ports.

      5. WC_defaulthost identifies the non-secure HTTP port.

    2. Select

      WAS and click Finish.

When the Web messaging service starts, the following line displays in the Console view:

[3/5/08 11:22:31:437 EST] 0000000a WebMsgService I   CWPSB1102I: The Web messaging service has started.

Tip: If you receive an error message after changing the URL, download and install the Web 2.0 feature pack Web messaging enablement fix.


Feedback