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.
- Download and install the WAS Feature Pack for Web 2.0 Web messaging enablement fix
- 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:
- Enable the Web messaging server:
- In the Servers view, right-click
WAS and select
Start.
- Once the server has started, right-click
WebSphere Application Server and select
Administration | Run administrative console. The Admin Console opens
- Log into the WAS administrative console.
- Click
Servers | Application Servers.
- Click the current application server in the Application servers list. The Configuration tab for your application server opens.
- In the Container Settings list, expand
Web Container Settings and click
Web container transport chains. The Web container transport chains list opens.
- 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.
- Click
Web Container Inbound Channel. The Web container inbound channel Configuration tab opens.
- Click
Custom Properties.
- 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.
- You can restart the application server now or wait until after the Configure Service Integration Bus step.
- Configure a service integration bus:
- Log into the WAS administrative console.
- Expand
Service integration then click
Buses. The Buses page opens.
- Click
New to create a new bus.
- In the name field, type thebus then deselect
Bus security. Click Next.
- On the Confirm create of new bus page, click Finish.
- Click
thebus. The thebus Configuration tab opens.
- In the Topology list click
Bus members. Then click
Add.
- Select the server to which you want to install the application. Click Next.
- For the rest of the steps, select the default values then click Finish.
- In the Messages box, click
Save to save the repository information.
- In the Servers view, right-click
WAS v6.1 and select
Restart.
- Create a topic connection factory:
- Log into the WAS administrative console.
- Click
Resources | JMS | Topic connection factories. The Topic connection factories page opens.
- Expand
Scope. In the Scope list, select a server level scope.
- Click
New. Select
Default messaging provider then click OK.
- In the name field, type QuoteStreamer.
- In the JNDI name field, type jms/QuotePublish.
- In the Bus name field, select thebus.
- Click
Apply, then click
Save to save the repository information.
- Run the sample on server:
- 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:
- Log into the WAS administrative console.
- Click
Servers | Application Servers.
- Select the target server.
- In the Communications list, click
Ports.
- WC_defaulthost identifies the non-secure HTTP port.
- 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