Using the HTTP Persistent Connection Feature

The PersistentConnectionClientProcess sends five simultaneous HTTP requests. Each SendHttpRequest activity in the PersistentConnectionClientProcess is configured with a ClientPCMConnection shared resource. The HttpReceiver in ServerProcess listens on connection specified by ServerConnection shared resource.

Procedure

  1. In the samples directory, select palette > http > PersistentConnection and double-click tibco.bw.sample.palette.http.PersistentConnection. For more information, see Accessing Samples .
  2. In Project Explorer expand the tibco.bw.sample.palette.http.PersistentConnection project.
  3. Set the default ApplicationProfile to match the OS you are running on. For more information, see Setting the Default Application Profile.
  4. Fully expand the Processes directory and double-click PersistentConnectionClientProcess.bwp.
  5. Click Run > Debug Configurations.
  6. At the left hand tree of Debug Configuration wizard, expand BusinessWorks Application and select BWApplication.
  7. Click the Applications tab and then click the Deselect All button if you have multiple applications. Select the check box next to tibco.bw.sample.palette.http.PersistentConnection.application.
  8. Click Debug.
    This runs the sample in Debug mode.
  9. Click the Terminate icon to stop the process.

Result

The PersistentConnection.log file is created at C:\tmp\PersistentConnection location. The file content is similar to the following:

Response received for Request2 at Wed, 11 Jun 2014 20:56:06 GMT

Response received for Request1 at Wed, 11 Jun 2014 20:56:06 GMT

Response received for Request4 at Wed, 11 Jun 2014 20:56:16 GMT

Response received for Request3 at Wed, 11 Jun 2014 20:56:16 GMT

Response received for Request3 at Wed, 11 Jun 2014 20:56:26 GMT