Skip to content

Commit 327d54e

Browse files
committed
Merge branch 'jira-wdt-972-server-start' into 'main'
Add option to disable merging of server and system component start arguments See merge request weblogic-cloud/weblogic-deploy-tooling!1854
2 parents f366fdc + bcdb48c commit 327d54e

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

core/src/main/python/wlsdeploy/tool/util/attribute_setter.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
from wlsdeploy.exception import exception_helper
8484
from wlsdeploy.logging.platform_logger import PlatformLogger
8585
from wlsdeploy.tool.util.wlst_helper import WlstHelper
86+
from wlsdeploy.util import model_config
8687
from wlsdeploy.util import model_helper
8788
from wlsdeploy.util import path_helper
8889
import wlsdeploy.util.unicode_helper as str_helper
@@ -662,15 +663,22 @@ def set_plugin_deployment_mbean(self, location, key, value, wlst_value):
662663

663664
def set_jvm_args(self, location, key, value, wlst_value):
664665
"""
665-
Set the server start args string. The new arguments are merged and re-sorted with existing arguments.
666+
Set the server start args string. The new arguments are merged and re-sorted with existing arguments,
667+
unless merge is turned off in tool.properties or using command-line -D.
666668
:param location: the location
667669
:param key: the attribute name
668670
:param value: the string value
669671
:param wlst_value: the existing value of the attribute from WLST
670672
:raises BundleAwareException of the specified type: if an error occurs
671673
"""
674+
merge = model_config.get_model_config().get_merge_server_start_arguments()
675+
672676
if value is None or len(value) == 0:
673677
result = value
678+
elif not merge:
679+
result = value
680+
if isinstance(value, list):
681+
result = ' '.join(value)
674682
elif wlst_value is None or len(wlst_value) == 0:
675683
new_args = JVMArguments(self.__logger, value)
676684
result = new_args.get_arguments_string()

core/src/main/python/wlsdeploy/util/model_config.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (c) 2020, 2024, Oracle and/or its affiliates.
2+
Copyright (c) 2020, 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
"""
55

@@ -36,6 +36,8 @@
3636
DISCOVER_RCU_DS_GENERATE_RCUDB_INFO_DEFAULT='true'
3737
ENABLE_CREATE_DOMAIN_PASSWORD_VALIDATION_PROP = 'enable.create.domain.password.validation'
3838
ENABLE_CREATE_DOMAIN_PASSWORD_VALIDATION_DEFAULT = 'true'
39+
MERGE_SERVER_START_ARGUMENTS = 'merge.server.start.arguments'
40+
MERGE_SERVER_START_ARGUMENTS_DEFAULT = 'true'
3941
REDEPLOY_TIMEOUT_PROP = 'redeploy.timeout'
4042
REDEPLOY_TIMEOUT_DEFAULT = '180000'
4143
SET_SERVER_GRPS_TIMEOUT_PROP = 'set.server.groups.timeout'
@@ -213,6 +215,13 @@ def get_discover_rcu_ds_generate_rcudb_info(self):
213215
"""
214216
return self._get_from_dict(DISCOVER_RCU_DS_GENERATE_RCUDB_INFO_PROP, DISCOVER_RCU_DS_GENERATE_RCUDB_INFO_DEFAULT)
215217

218+
def get_merge_server_start_arguments(self):
219+
"""
220+
Return whether to merge server start arguments.
221+
:return: whether to merge server start arguments
222+
"""
223+
return self._get_from_dict_as_boolean(MERGE_SERVER_START_ARGUMENTS, MERGE_SERVER_START_ARGUMENTS_DEFAULT)
224+
216225
def use_ssh_compression(self):
217226
"""
218227
Return whether to use SSH compression.

core/src/main/resources/oracle/weblogic/deploy/aliases/category_modules/SystemComponent.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"default_name_value": "${NO_NAME_0:%SYSTEMCOMPONENT%}",
1313
"folders": {},
1414
"attributes": {
15-
"Arguments": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Arguments", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "set_method": "MBEAN.set_jvm_args" } ],
15+
"Arguments": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Arguments", "wlst_path": "WP001", "default_value": null, "wlst_type": "delimited_string[space]", "set_method": "MBEAN.set_jvm_args" } ],
1616
"BeaHome": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "BeaHome", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "uses_path_tokens": "true" } ],
1717
"ClassPath": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ClassPath", "wlst_path": "WP001", "default_value": null, "wlst_type": "delimited_string[path_separator]", "preferred_model_type": "delimited_string", "uses_path_tokens": "true" } ],
1818
"JavaHome": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "JavaHome", "wlst_path": "WP001", "default_value": null, "wlst_type": "string", "uses_path_tokens": "true" } ],

installer/src/main/lib/tool.properties

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2020, 2024, Oracle and/or its affiliates.
1+
# Copyright (c) 2020, 2025, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33
#
44
connect.timeout=120000
@@ -78,6 +78,12 @@ store.discovered.passwords.in.clear.text=false
7878
# ones passed on the command-line.
7979
#
8080
store.discover.admin_credentials=true
81+
#
82+
# When deploying JVM arguments for server start or system component start,
83+
# should the arguments be merged with existing arguments,
84+
# or used without merging.
85+
#
86+
merge.server.start.arguments=true
8187

8288
#
8389
# the property model.encryption.secret specifies the name of

0 commit comments

Comments
 (0)