|
11 | 11 | from wlsdeploy.aliases.model_constants import CLUSTER
|
12 | 12 | from wlsdeploy.aliases.model_constants import COHERENCE_CLUSTER_SYSTEM_RESOURCE
|
13 | 13 | from wlsdeploy.aliases.model_constants import CUSTOM_IDENTITY_KEYSTORE_FILE
|
| 14 | +from wlsdeploy.aliases.model_constants import JDBC_RESOURCE |
14 | 15 | from wlsdeploy.aliases.model_constants import JDBC_SYSTEM_RESOURCE
|
15 | 16 | from wlsdeploy.aliases.model_constants import NM_PROPERTIES
|
16 | 17 | from wlsdeploy.aliases.model_constants import SERVER
|
@@ -123,9 +124,30 @@ def create_placeholder_named_elements(self, location, model_type, model_nodes):
|
123 | 124 | token = self.alias_helper.get_name_token(resource_location)
|
124 | 125 | resource_location.add_name_token(token, name)
|
125 | 126 | deployer_utils.create_and_cd(resource_location, existing_names, self.alias_helper)
|
| 127 | + self._update_placeholder(model_type, name, resource_location) |
126 | 128 |
|
127 | 129 | self.wlst_helper.cd(original_location)
|
128 | 130 |
|
| 131 | + def _update_placeholder(self, type_name, name, location): |
| 132 | + """ |
| 133 | + Make any required updates to a newly-created placeholder. |
| 134 | + :param type_name: the type name of the placeholder |
| 135 | + :param name: the name of the placeholder MBean |
| 136 | + :param location: the location of the placeholder |
| 137 | + """ |
| 138 | + if type_name == JDBC_SYSTEM_RESOURCE: |
| 139 | + # for online update, Name must be assigned to each JDBCSystemResource / JdbcResource MBean. |
| 140 | + # (see datasource_deployer.set_attributes()) |
| 141 | + child_location = LocationContext(location).append_location(JDBC_RESOURCE) |
| 142 | + wlst_path = self.alias_helper.get_wlst_attributes_path(child_location) |
| 143 | + if self.wlst_helper.path_exists(wlst_path): |
| 144 | + original_location = self.wlst_helper.get_pwd() |
| 145 | + self.wlst_helper.cd(wlst_path) |
| 146 | + existing_name = self.wlst_helper.get('Name') |
| 147 | + if existing_name is None: |
| 148 | + self.wlst_helper.set('Name', name) |
| 149 | + self.wlst_helper.cd(original_location) |
| 150 | + |
129 | 151 | def qualify_nm_properties(self, type_name, model_nodes, base_location, model_context, attribute_setter):
|
130 | 152 | """
|
131 | 153 | For the NM properties MBean, update the keystore file path to be fully qualified with the domain directory.
|
|
0 commit comments