|
7 | 7 | import os |
8 | 8 | import sys |
9 | 9 |
|
| 10 | +from java.lang import Exception as JException |
10 | 11 | from oracle.weblogic.deploy.deploy import DeployException |
11 | 12 | from oracle.weblogic.deploy.exception import BundleAwareException |
12 | 13 | from oracle.weblogic.deploy.validate import ValidateException |
@@ -177,30 +178,23 @@ def __update_online(model_deployer, model, model_context, aliases): |
177 | 178 | __logger.info("WLSDPLY-09007", admin_url, method_name=_method_name, class_name=_class_name) |
178 | 179 |
|
179 | 180 | topology_updater = TopologyUpdater(model, model_context, aliases, wlst_mode=WlstModes.ONLINE) |
180 | | - jdbc_names = None |
181 | 181 | try: |
182 | 182 | jdbc_names = topology_updater.update_machines_clusters_and_servers(delete_now=False) |
183 | 183 | topology_updater.warn_set_server_groups() |
184 | | - except DeployException, de: |
185 | | - deployer_utils.release_edit_session_and_disconnect() |
186 | | - raise de |
187 | 184 |
|
188 | | - # Server or Cluster may be added, this is to make sure they are targeted properly |
189 | | - try: |
| 185 | + # Server or Cluster may be added, this is to make sure they are targeted properly |
190 | 186 | topology_updater.set_server_groups() |
191 | | - except BundleAwareException, ex: |
192 | | - deployer_utils.release_edit_session_and_disconnect() |
193 | | - raise ex |
194 | 187 |
|
195 | | - try: |
196 | 188 | topology_updater.clear_placeholder_targeting(jdbc_names) |
197 | 189 | topology_updater.update() |
198 | 190 | model_deployer.deploy_resources() |
199 | 191 | model_deployer.distribute_database_wallets_online() |
200 | 192 | model_deployer.deploy_app_attributes_online() |
201 | | - except DeployException, de: |
| 193 | + |
| 194 | + except (DeployException, exceptions.Exception, JException), ex: |
| 195 | + # release the edit session, and raise the exception for tool_main to handle |
202 | 196 | deployer_utils.release_edit_session_and_disconnect() |
203 | | - raise de |
| 197 | + raise ex |
204 | 198 |
|
205 | 199 | exit_code = deployer_utils.online_check_save_activate(model_context) |
206 | 200 | # if user requested cancel changes if restart required stops |
|
0 commit comments