|
1 | 1 | """ |
2 | | -Copyright (c) 2017, 2024, Oracle and/or its affiliates. |
| 2 | +Copyright (c) 2017, 2025, Oracle and/or its affiliates. |
3 | 3 | Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. |
4 | 4 | """ |
5 | | -import oracle.weblogic.deploy.util.PyOrderedDict as OrderedDict |
| 5 | +from oracle.weblogic.deploy.util import PyOrderedDict as OrderedDict |
| 6 | +from oracle.weblogic.deploy.util import WLSDeployArchive |
6 | 7 |
|
7 | | -import wlsdeploy.util.dictionary_utils as dictionary_utils |
8 | 8 | from wlsdeploy.aliases.location_context import LocationContext |
9 | 9 | from wlsdeploy.aliases.model_constants import CONNECTION_FACTORY |
| 10 | +from wlsdeploy.aliases.model_constants import CONNECTION_URL |
10 | 11 | from wlsdeploy.aliases.model_constants import DESTINATION_KEY |
11 | 12 | from wlsdeploy.aliases.model_constants import DISTRIBUTED_QUEUE |
12 | 13 | from wlsdeploy.aliases.model_constants import DISTRIBUTED_TOPIC |
| 14 | +from wlsdeploy.aliases.model_constants import FILE_URI |
13 | 15 | from wlsdeploy.aliases.model_constants import FOREIGN_SERVER |
14 | 16 | from wlsdeploy.aliases.model_constants import GROUP_PARAMS |
15 | 17 | from wlsdeploy.aliases.model_constants import JMS_RESOURCE |
|
27 | 29 | from wlsdeploy.aliases.model_constants import UNIFORM_DISTRIBUTED_QUEUE |
28 | 30 | from wlsdeploy.aliases.model_constants import UNIFORM_DISTRIBUTED_TOPIC |
29 | 31 | from wlsdeploy.aliases.wlst_modes import WlstModes |
30 | | -from wlsdeploy.exception.exception_types import ExceptionType |
31 | 32 | from wlsdeploy.tool.deploy import deployer_utils |
32 | | -from wlsdeploy.util import model_helper |
33 | 33 | from wlsdeploy.tool.deploy import log_helper |
34 | 34 | from wlsdeploy.tool.deploy.deployer import Deployer |
| 35 | +from wlsdeploy.util import dictionary_utils |
| 36 | +from wlsdeploy.util import model_helper |
35 | 37 |
|
36 | 38 |
|
37 | 39 | class JmsResourcesDeployer(Deployer): |
@@ -108,6 +110,18 @@ def _add_model_elements(self, type_name, model_nodes, location, delete_now=True) |
108 | 110 |
|
109 | 111 | Deployer._add_model_elements(self, type_name, model_nodes, location, delete_now=delete_now) |
110 | 112 |
|
| 113 | + # Override |
| 114 | + def _extract_from_archive_if_needed(self, location, key, value): |
| 115 | + """ |
| 116 | + Overriding this method to ensure foreign server connection archive URL is valid |
| 117 | + """ |
| 118 | + result = Deployer._extract_from_archive_if_needed(self, location, key, value) |
| 119 | + |
| 120 | + if key == CONNECTION_URL and WLSDeployArchive.isPathIntoArchive(result): |
| 121 | + result = FILE_URI + self.path_helper.join(self.model_context.get_domain_home(), result) |
| 122 | + |
| 123 | + return result |
| 124 | + |
111 | 125 | def _add_jms_resources(self, resource_nodes, location): |
112 | 126 | """ |
113 | 127 | Special processing to process child nodes in specific order |
|
0 commit comments