PageRenderTime 47ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/runtime/esb-manage/regress/jbiadmin00135.ksh

https://bitbucket.org/rsaqc/openesb-core
Korn Shell | 96 lines | 28 code | 16 blank | 52 comment | 0 complexity | 205761b48b20b8340f317b35bd0fd8d9 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. # @(#)jbiadmin00135.ksh
  25. # Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
  26. #
  27. # END_HEADER - DO NOT EDIT
  28. #
  29. echo "jbiadmin00134 : Rollback of a service unit to Shutdown state"
  30. #############################################################################################
  31. # Tests starting a service assembly which has a service unit in the Stopped state #
  32. # and start fails, the service unit state should be rolled back to Stopped #
  33. # #
  34. # #
  35. # A test component used throws an exception on start and shutDown of a service unit #
  36. # #
  37. # The test : #
  38. # (a) Package, install and start the test components #
  39. # (b) Deploy the service assembly, deploy should succeed. #
  40. # (c) Start the service assembly, start should fail for manage-binding-1 su. The failed #
  41. # service unit is rolled bcak to the Shutdown state. #
  42. # (d) Stop, shutdown the service assembly #
  43. # (e) Cleanup #
  44. # #
  45. #############################################################################################
  46. . ./regress_defs.ksh
  47. COMPONENT_ARCHIVE_1=$JV_SVC_TEST_CLASSES/dist/component-binding-1.jar
  48. COMPONENT_NAME_1=manage-binding-1
  49. COMPONENT_ARCHIVE_2=$JV_SVC_TEST_CLASSES/dist/component-binding-2.jar
  50. COMPONENT_NAME_2=manage-binding-2
  51. SA_ARCHIVE=$JV_SVC_TEST_CLASSES/dist/deploy-sa.jar
  52. SA_NAME=esbadmin00089-sa
  53. #
  54. # Setup :
  55. #
  56. ant -q -emacs -DESBMEMBER_ADMIN_PORT="$JBI_ADMIN_PORT" -lib "$REGRESS_CLASSPATH" -f Package.xml pkg.service.assembly.jars
  57. ant -q -emacs -DESBMEMBER_ADMIN_PORT="$JBI_ADMIN_PORT" -lib "$REGRESS_CLASSPATH" -f jbiadmin00135.xml pkg.test.components
  58. # Setup : Install and start component on server
  59. $JBI_ANT -Djbi.install.file=$COMPONENT_ARCHIVE_1 install-component
  60. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_1 start-component
  61. # Setup : Install and start component on server for deploying the service assembly
  62. $JBI_ANT -Djbi.install.file=$COMPONENT_ARCHIVE_2 install-component
  63. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_2 start-component
  64. # Test (c) : Deploy and start the test service assembly
  65. $JBI_ANT -Djbi.deploy.file=$SA_ARCHIVE deploy-service-assembly
  66. $JBI_ANT -Djbi.service.assembly.name=$SA_NAME start-service-assembly
  67. $JBI_ANT list-service-assemblies
  68. $JBI_ANT -Djbi.service.assembly.name=$SA_NAME stop-service-assembly
  69. $JBI_ANT -Djbi.service.assembly.name=$SA_NAME shut-down-service-assembly
  70. $JBI_ANT list-service-assemblies
  71. # Cleanup : undeploy the service assembly
  72. $JBI_ANT -Djbi.service.assembly.name=$SA_NAME -Djbi.force.task=true -Djbi.keep.archive=false undeploy-service-assembly
  73. $JBI_ANT list-service-assemblies
  74. # Cleanup : stop/shutdown/uninstall both the components
  75. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_1 stop-component
  76. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_1 shut-down-component
  77. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_1 -Djbi.keep.archive=false uninstall-component
  78. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_2 stop-component
  79. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_2 shut-down-component
  80. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_2 -Djbi.keep.archive=false uninstall-component