asynctest.xml.example 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <!--
  2. Licensed Materials - Property of IBM
  3. IBM Cognos Products: disp
  4. (C) Copyright IBM Corp. 2005 2010
  5. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6. -->
  7. <!-- example service definition file using the async toolkit -->
  8. <service xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="./ ./services.xsd" name="asynctest" class="com.cognos.pogo.services.SoapActionHandlerService">
  9. <handlers>
  10. <!--
  11. define a handler that is an instance of AsyncHandler:
  12. threadBaseName - prefix used to name threads that run async requests
  13. expiryCheckIntervalms - how often thread that watches for abandoned requests
  14. wakes up. Each time it wakes it increments a count on each running async
  15. conversation. Each time we receive a request related to the conversation
  16. the count is reset to 0.
  17. abandonLimit - if the count reaches this value the conversation is considered to
  18. have been abandoned by the client. Dispatcher cancels the request by
  19. calling abandon() on teh async service.
  20. graceLimit - when the count reaches this value we delete the object that represents
  21. the conversation.
  22. wrappedHandler - name of the handler that implements Asyncable.
  23. onCompletionHandler - name of handler to be invoked when the async execution of
  24. the request completes. This is intended to be used to invoke a
  25. SimpleRequestReportingHandler (or similar), to integrate async services
  26. with dispatcher's mechanism for reporting runtime stats to ContentManager.
  27. -->
  28. <handler name="asyncTest" classname="com.cognos.pogo.async.impl.AsyncHandler" threadBaseName="asyncTestThread-" expiryCheckIntervalms="10000" abandonLimit="4" graceLimit="8" wrappedHandler="asynctest.testAsyncService" onCompletionHandler="asynctest.onCompletion"/>
  29. <!-- example handler that implements Asyncable.-->
  30. <handler name="testAsyncService" classname="com.cognos.pogo.async.debug.TestAsyncServiceHandler" requestDuration="40"/>
  31. <!-- example handler to be invoked when execution is complete. -->
  32. <handler name="onCompletion" classname="com.cognos.pogo.async.debug.OnCompletionExample"/>
  33. <handler name="async" classname="com.cognos.pogo.handlers.logic.ChainHandler">
  34. <chain>
  35. <handler_ref name="pogo.test_do_html_errors"/> <!-- test if need HTML error page -->
  36. <handler_ref name="asyncTest"/>
  37. <handler_ref name="pogo.respond"/>
  38. </chain>
  39. </handler>
  40. </handlers>
  41. <soapActions>
  42. <soapAction path="async" handler="asynctest.async"/>
  43. <soapAction path="async.absolute" handler="asynctest.async"/>
  44. <soapAction path="async.control" handler="asynctest.async"/>
  45. </soapActions>
  46. </service>