Skip to content

Commit 4856c9a

Browse files
committed
Merge branch 'jira-wdt-970-uri' into 'main'
Convert foreign server connection URL archive path to URL See merge request weblogic-cloud/weblogic-deploy-tooling!1849
2 parents c27612b + 47f43fb commit 4856c9a

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

core/src/main/python/wlsdeploy/tool/deploy/jms_resources_deployer.py

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
"""
2-
Copyright (c) 2017, 2024, Oracle and/or its affiliates.
2+
Copyright (c) 2017, 2025, Oracle and/or its affiliates.
33
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
"""
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
67

7-
import wlsdeploy.util.dictionary_utils as dictionary_utils
88
from wlsdeploy.aliases.location_context import LocationContext
99
from wlsdeploy.aliases.model_constants import CONNECTION_FACTORY
10+
from wlsdeploy.aliases.model_constants import CONNECTION_URL
1011
from wlsdeploy.aliases.model_constants import DESTINATION_KEY
1112
from wlsdeploy.aliases.model_constants import DISTRIBUTED_QUEUE
1213
from wlsdeploy.aliases.model_constants import DISTRIBUTED_TOPIC
14+
from wlsdeploy.aliases.model_constants import FILE_URI
1315
from wlsdeploy.aliases.model_constants import FOREIGN_SERVER
1416
from wlsdeploy.aliases.model_constants import GROUP_PARAMS
1517
from wlsdeploy.aliases.model_constants import JMS_RESOURCE
@@ -27,11 +29,11 @@
2729
from wlsdeploy.aliases.model_constants import UNIFORM_DISTRIBUTED_QUEUE
2830
from wlsdeploy.aliases.model_constants import UNIFORM_DISTRIBUTED_TOPIC
2931
from wlsdeploy.aliases.wlst_modes import WlstModes
30-
from wlsdeploy.exception.exception_types import ExceptionType
3132
from wlsdeploy.tool.deploy import deployer_utils
32-
from wlsdeploy.util import model_helper
3333
from wlsdeploy.tool.deploy import log_helper
3434
from wlsdeploy.tool.deploy.deployer import Deployer
35+
from wlsdeploy.util import dictionary_utils
36+
from wlsdeploy.util import model_helper
3537

3638

3739
class JmsResourcesDeployer(Deployer):
@@ -108,6 +110,18 @@ def _add_model_elements(self, type_name, model_nodes, location, delete_now=True)
108110

109111
Deployer._add_model_elements(self, type_name, model_nodes, location, delete_now=delete_now)
110112

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+
111125
def _add_jms_resources(self, resource_nodes, location):
112126
"""
113127
Special processing to process child nodes in specific order

0 commit comments

Comments
 (0)