PageRenderTime 49ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/ri-clients/jbi-admin-cli/regress/jbi-admin-cli00009.ksh

https://bitbucket.org/rsaqc/openesb-core
Korn Shell | 186 lines | 113 code | 30 blank | 43 comment | 1 complexity | 15b3317002607f322344d12074d434bf MD5 | raw file
  1. #!/bin/sh
  2. #
  3. # BEGIN_HEADER - DO NOT EDIT
  4. #
  5. # The contents of this file are subject to the terms
  6. # of the Common Development and Distribution License
  7. # (the "License"). You may not use this file except
  8. # in compliance with the License.
  9. #
  10. # You can obtain a copy of the license at
  11. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  12. # See the License for the specific language governing
  13. # permissions and limitations under the License.
  14. #
  15. # When distributing Covered Code, include this CDDL
  16. # HEADER in each file and include the License file at
  17. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  18. # If applicable add the following below this CDDL HEADER,
  19. # with the fields enclosed by brackets "[]" replaced with
  20. # your own identifying information: Portions Copyright
  21. # [year] [name of copyright owner]
  22. #
  23. #
  24. # @(#)jbi-admin-cli00001.ksh
  25. # Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
  26. #
  27. # END_HEADER - DO NOT EDIT
  28. #
  29. #----------------------------------------------------------------------------------
  30. # Main function called that will run the test
  31. #----------------------------------------------------------------------------------
  32. run_test()
  33. {
  34. initilize_test
  35. #--------------------------------------------------------------------------------
  36. # Make sure http binding component is started. (output redirected to TEMP file)
  37. #--------------------------------------------------------------------------------
  38. start_component server sun-http-binding
  39. #--------------------------------------------------------------------------------
  40. # Test setting and showing the component configuration values
  41. #--------------------------------------------------------------------------------
  42. echo ""
  43. echo "-------------------------------------------------------------------"
  44. echo " Set the OutboundTread component value to 5 from the command line"
  45. echo "-------------------------------------------------------------------"
  46. echo "set-jbi-component-configuration --component=sun-http-binding OutboundThreads=5"
  47. $AS8BASE/bin/asadmin set-jbi-component-configuration --component=sun-http-binding --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS OutboundThreads=5
  48. echo ""
  49. echo "-------------------------------------------------------------------"
  50. echo " Show just the OutboundThreads configuration value"
  51. echo "-------------------------------------------------------------------"
  52. echo "show-jbi-binding-component --configuration sun-http-binding | grep OutboundThreads"
  53. $AS8BASE/bin/asadmin show-jbi-binding-component --configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS sun-http-binding | grep OutboundThreads
  54. echo ""
  55. echo "-------------------------------------------------------------------"
  56. echo " Set a both the OutboundThread and UseJVMProxySettings variables from the command line"
  57. echo "-------------------------------------------------------------------"
  58. echo "set-jbi-component-configuration --component=sun-http-binding OutboundThreads=7,UseJVMProxySettings=true"
  59. $AS8BASE/bin/asadmin set-jbi-component-configuration --component=sun-http-binding --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS OutboundThreads=7,UseJVMProxySettings=true
  60. echo ""
  61. echo "-------------------------------------------------------------------"
  62. echo " Show the sun-http-binding Component Configuration Values"
  63. echo "-------------------------------------------------------------------"
  64. echo "show-jbi-binding-component --configuration sun-http-binding | grep OutboundThreads"
  65. $AS8BASE/bin/asadmin show-jbi-binding-component --configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS sun-http-binding | grep OutboundThreads
  66. echo ""
  67. echo "-------------------------------------------------------------------"
  68. echo " Show the sun-http-binding Component Configuration Values"
  69. echo "-------------------------------------------------------------------"
  70. echo "show-jbi-binding-component --configuration sun-http-binding | grep UseJVMProxySettings"
  71. $AS8BASE/bin/asadmin show-jbi-binding-component --configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS sun-http-binding | grep UseJVMProxySettings
  72. echo ""
  73. echo "-------------------------------------------------------------------"
  74. echo " Using the property file, set the values"
  75. echo "-------------------------------------------------------------------"
  76. echo "set-jbi-component-configuration --component=sun-http-binding componentConfig.property"
  77. $AS8BASE/bin/asadmin set-jbi-component-configuration --component=sun-http-binding --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $JV_SVC_BLD/regress/componentConfig.property
  78. echo ""
  79. echo "-------------------------------------------------------------------"
  80. echo " Show the sun-http-binding Component Configuration Values"
  81. echo "-------------------------------------------------------------------"
  82. echo "show-jbi-binding-component --configuration sun-http-binding | grep OutboundThreads"
  83. $AS8BASE/bin/asadmin show-jbi-binding-component --configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS sun-http-binding | grep OutboundThreads
  84. #--------------------------------------------------------------------------------
  85. # Test setting and showing the component logger levels
  86. #--------------------------------------------------------------------------------
  87. echo ""
  88. echo "-------------------------------------------------------------------"
  89. echo " Using the property file, set the logger levels"
  90. echo "-------------------------------------------------------------------"
  91. echo "set-jbi-component-logger --component=sun-http-binding componentLoggers.property"
  92. $AS8BASE/bin/asadmin set-jbi-component-logger --component=sun-http-binding --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $JV_SVC_BLD/regress/componentLoggers.property
  93. echo ""
  94. echo "-------------------------------------------------------------------"
  95. echo " Show just the com.sun.jbi.httpsoapbc.HttpNormalizer logger value"
  96. echo "-------------------------------------------------------------------"
  97. echo "show-jbi-binding-component --loggers sun-http-binding | grep com.sun.jbi.httpsoapbc.HttpNormalizer"
  98. $AS8BASE/bin/asadmin show-jbi-binding-component --loggers --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS sun-http-binding | grep com.sun.jbi.httpsoapbc.HttpNormalizer
  99. echo ""
  100. echo "-------------------------------------------------------------------"
  101. echo " Show com.sun.jbi.httpsoapbc.HttpNormalizer but use the --terse flag"
  102. echo "-------------------------------------------------------------------"
  103. echo "show-jbi-binding-component --loggers --terse sun-http-binding | grep com.sun.jbi.httpsoapbc.HttpNormalizer"
  104. $AS8BASE/bin/asadmin show-jbi-binding-component --loggers --terse --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS sun-http-binding | grep com.sun.jbi.httpsoapbc.HttpNormalizer
  105. echo ""
  106. echo "-------------------------------------------------------------------"
  107. echo " Set the logger com.sun.jbi.httpsoapbc.HttpNormalizer to FINE from the command line"
  108. echo "-------------------------------------------------------------------"
  109. echo "set-jbi-component-logger --component=sun-http-binding com.sun.jbi.httpsoapbc.HttpNormalizer=FINE"
  110. $AS8BASE/bin/asadmin set-jbi-component-logger --component=sun-http-binding --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS com.sun.jbi.httpsoapbc.HttpNormalizer=FINE
  111. echo ""
  112. echo "-------------------------------------------------------------------"
  113. echo " Show all the sun-http-binding Logger Levels"
  114. echo "-------------------------------------------------------------------"
  115. echo "show-jbi-binding-component --loggers sun-http-binding | grep com.sun.jbi.httpsoapbc.HttpNormalizer"
  116. $AS8BASE/bin/asadmin show-jbi-binding-component --loggers --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS sun-http-binding | grep com.sun.jbi.httpsoapbc.HttpNormalizer
  117. echo ""
  118. echo "-------------------------------------------------------------------"
  119. echo " Set a both the com.sun.jbi.httpsoapbc.HttpNormalizer and the"
  120. echo " com.sun.jbi.httpsoapbc.Extension loggers to WARNING from the command line"
  121. echo "-------------------------------------------------------------------"
  122. echo "set-jbi-component-logger --component=sun-http-binding com.sun.jbi.httpsoapbc.HttpNormalizer=WARNING,com.sun.jbi.httpsoapbc.Extension=WARNING"
  123. $AS8BASE/bin/asadmin set-jbi-component-logger --component=sun-http-binding --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS com.sun.jbi.httpsoapbc.HttpNormalizer=WARNING,com.sun.jbi.httpsoapbc.Extension=WARNING
  124. echo ""
  125. echo "-------------------------------------------------------------------"
  126. echo " Show all the sun-http-binding Logger Levels"
  127. echo "-------------------------------------------------------------------"
  128. echo "show-jbi-binding-component --loggers sun-http-binding | grep com.sun.jbi.httpsoapbc.HttpNormalizer"
  129. $AS8BASE/bin/asadmin show-jbi-binding-component --loggers --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS sun-http-binding | grep com.sun.jbi.httpsoapbc.HttpNormalizer
  130. echo ""
  131. echo "-------------------------------------------------------------------"
  132. echo " Show the com.sun.jbi.httpsoapbc.Extension Logger Levels"
  133. echo "-------------------------------------------------------------------"
  134. echo "show-jbi-binding-component --loggers sun-http-binding | grep com.sun.jbi.httpsoapbc.Extension"
  135. $AS8BASE/bin/asadmin show-jbi-binding-component --loggers --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS sun-http-binding | grep com.sun.jbi.httpsoapbc.Extension
  136. echo ""
  137. echo "-------------------------------------------------------------------"
  138. echo " Using the property file, set the logger levels"
  139. echo "-------------------------------------------------------------------"
  140. echo "set-jbi-component-logger --component=sun-http-binding componentLoggers.property"
  141. $AS8BASE/bin/asadmin set-jbi-component-logger --component=sun-http-binding --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $JV_SVC_BLD/regress/componentLoggers.property
  142. echo ""
  143. echo "-------------------------------------------------------------------"
  144. echo " Show the com.sun.jbi.httpsoapbc.Extension Logger Levels"
  145. echo "-------------------------------------------------------------------"
  146. echo "show-jbi-binding-component --loggers sun-http-binding | grep com.sun.jbi.httpsoapbc.Extension"
  147. $AS8BASE/bin/asadmin show-jbi-binding-component --loggers --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS sun-http-binding | grep com.sun.jbi.httpsoapbc.Extension
  148. }
  149. #----------------------------------------------------------------------------------
  150. # Perform the regression setup and call the function that will run the test
  151. #----------------------------------------------------------------------------------
  152. TEST_NAME="jbi-admin-cli00009"
  153. TEST_DESCRIPTION="Test Show and Set for Component configuration and loggers"
  154. . ./regress_defs.ksh
  155. run_test
  156. exit 0