PageRenderTime 1974ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://bitbucket.org/rsaqc/openesb-core
Korn Shell | 179 lines | 111 code | 28 blank | 40 comment | 2 complexity | e4a6814de45deef90b0a0deacda2bfca 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. # Test setting and showing the runtime configuration values
  37. #--------------------------------------------------------------------------------
  38. echo ""
  39. echo "-------------------------------------------------------------------"
  40. echo " Set a Runtime Configuration value using command line arguments"
  41. echo "-------------------------------------------------------------------"
  42. echo "set-jbi-runtime-configuration heartBeatInterval=5000"
  43. $AS8BASE/bin/asadmin set-jbi-runtime-configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS heartBeatInterval=5000
  44. echo ""
  45. echo "-------------------------------------------------------------------"
  46. echo " Show the Runtime Configuration Values."
  47. echo "-------------------------------------------------------------------"
  48. echo "show-jbi-runtime-configuration"
  49. $AS8BASE/bin/asadmin show-jbi-runtime-configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  50. echo ""
  51. echo "-------------------------------------------------------------------"
  52. echo " Set a Runtime Configuration value using command line arguments"
  53. echo "-------------------------------------------------------------------"
  54. echo "set-jbi-runtime-configuration heartBeatInterval=6000"
  55. $AS8BASE/bin/asadmin set-jbi-runtime-configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS heartBeatInterval=6000
  56. echo ""
  57. echo "-------------------------------------------------------------------"
  58. echo " Show Runtime Configuration Values"
  59. echo "-------------------------------------------------------------------"
  60. echo "show-jbi-runtime-configuration"
  61. $AS8BASE/bin/asadmin show-jbi-runtime-configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  62. echo ""
  63. echo "-------------------------------------------------------------------"
  64. echo " Set the two Runtime Configuration values using command line arguments"
  65. echo "-------------------------------------------------------------------"
  66. echo "set-jbi-runtime-configuration heartBeatInterval=7000,startOnDeploy=true"
  67. $AS8BASE/bin/asadmin set-jbi-runtime-configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS heartBeatInterval=7000,startOnDeploy=true
  68. echo ""
  69. echo "-------------------------------------------------------------------"
  70. echo " Show the Runtime Configuration Values"
  71. echo "-------------------------------------------------------------------"
  72. echo "show-jbi-runtime-configuration"
  73. $AS8BASE/bin/asadmin show-jbi-runtime-configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  74. echo ""
  75. echo "-------------------------------------------------------------------"
  76. echo " Using a property file, set the heartbeat value"
  77. echo "-------------------------------------------------------------------"
  78. echo "set-jbi-runtime-configuration runtimeConfig.property"
  79. $AS8BASE/bin/asadmin set-jbi-runtime-configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $JV_SVC_BLD/regress/runtimeConfig.property
  80. echo ""
  81. echo "-------------------------------------------------------------------"
  82. echo " Show the Runtime Configuration Values"
  83. echo "-------------------------------------------------------------------"
  84. echo "show-jbi-runtime-configuration"
  85. $AS8BASE/bin/asadmin show-jbi-runtime-configuration --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  86. #--------------------------------------------------------------------------------
  87. # Test setting and showing the runtime logger levels
  88. #--------------------------------------------------------------------------------
  89. echo ""
  90. echo "-------------------------------------------------------------------"
  91. echo " Using the property file, set all the logger levels to INFO"
  92. echo "-------------------------------------------------------------------"
  93. echo "set-jbi-runtime-logger runtimeLogger.property"
  94. $AS8BASE/bin/asadmin set-jbi-runtime-logger --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $JV_SVC_BLD/regress/runtimeLogger.property
  95. echo ""
  96. echo "-------------------------------------------------------------------"
  97. echo " Show the Runtime Logger Values"
  98. echo "-------------------------------------------------------------------"
  99. echo "show-jbi-runtime-loggers"
  100. $AS8BASE/bin/asadmin show-jbi-runtime-loggers --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  101. echo ""
  102. echo "-------------------------------------------------------------------"
  103. echo " Show only the com.sun.jbi.management logger level"
  104. echo "-------------------------------------------------------------------"
  105. echo "show-jbi-runtime-loggers | grep com.sun.jbi.management"
  106. $AS8BASE/bin/asadmin show-jbi-runtime-loggers --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep com.sun.jbi.management
  107. echo ""
  108. echo "-------------------------------------------------------------------"
  109. echo " Set the Runtime Logger Level for the com.sun.jbi.management Logger from the command line"
  110. echo "-------------------------------------------------------------------"
  111. echo "set-jbi-runtime-logger com.sun.jbi.management=WARNING"
  112. $AS8BASE/bin/asadmin set-jbi-runtime-logger --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS com.sun.jbi.management=WARNING
  113. echo ""
  114. echo "-------------------------------------------------------------------"
  115. echo " Show the Runtime Logger Values"
  116. echo "-------------------------------------------------------------------"
  117. echo "show-jbi-runtime-loggers"
  118. $AS8BASE/bin/asadmin show-jbi-runtime-loggers --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  119. echo ""
  120. echo "-------------------------------------------------------------------"
  121. echo " Set two Runtime Logger Level values from the command line"
  122. echo "-------------------------------------------------------------------"
  123. echo "set-jbi-runtime-logger com.sun.jbi.management=WARNING"
  124. $AS8BASE/bin/asadmin set-jbi-runtime-logger --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS com.sun.jbi.management=FINE,com.sun.jbi.messaging=FINE
  125. echo ""
  126. echo "-------------------------------------------------------------------"
  127. echo " Show the Runtime Logger Values"
  128. echo "-------------------------------------------------------------------"
  129. echo "show-jbi-runtime-loggers"
  130. $AS8BASE/bin/asadmin show-jbi-runtime-loggers --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  131. echo ""
  132. echo "-------------------------------------------------------------------"
  133. echo " Using the property file, set all the logger levels to INFO"
  134. echo "-------------------------------------------------------------------"
  135. echo "set-jbi-runtime-logger runtimeLogger.property"
  136. $AS8BASE/bin/asadmin set-jbi-runtime-logger --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $JV_SVC_BLD/regress/runtimeLogger.property
  137. echo ""
  138. echo "-------------------------------------------------------------------"
  139. echo " Show the Runtime Logger Values"
  140. echo "-------------------------------------------------------------------"
  141. echo "show-jbi-runtime-loggers"
  142. $AS8BASE/bin/asadmin show-jbi-runtime-loggers --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  143. }
  144. #----------------------------------------------------------------------------------
  145. # Perform the regression setup and call the function that will run the test
  146. #----------------------------------------------------------------------------------
  147. TEST_NAME="jbi-admin-cli00008"
  148. TEST_DESCRIPTION="Test the set and show commands for Runtime Configuration and Runtime Loggers"
  149. . ./regress_defs.ksh
  150. run_test
  151. exit 0