ServiceControlFactory.jws Sample

A web service that uses a control factory to dynamically manage multiple instances of a Web Service control, each of which has its own state.

Concepts Demonstrated by this Sample

Location of Sample Files

This sample is located in the controlFactory folder of the WebServices project in the SamplesApp sample application. In the file system the location is:

BEA_HOME\weblogic81\samples\workshop\SamplesApp\WebServices\controlFactory\ServiceControlFactory.jws

To Run the Sample

  1. Start WebLogic Server in the Workshop domain. You can do this in one of the following ways:
  2. Launch the service either by opening it in WebLogic Workshop and selecting the Start operation or by entering http://localhost:7001/WebServices/controlFactory/ServiceControlFactory.jws in the address bar of your browser. If WebLogic Server is running in the appropriate domain on this machine and you have deployed the SamplesApp sample application, you may click here to run the sample.
  3. Navigate to the Test Form tab of Test View, if necessary.
  4. Enter an integer to specify the number of services to instantiate, and invoke the startServices method. Note that n instances of SlowServiceControl.jcx are created, where n is the value that you entered.
  5. Click Refresh to observe callbacks returning from each instance of the control. The time of return is based on a randomly generated interval for each instance. When all control callbacks have completed, the allServicesComplete callback is invoked on the service, returning the results from each instance to the service.

Related Topics

Control Factories: Managing Collections of Controls