@@ -557,28 +557,18 @@ def __create_clusters_and_servers(self, location):
557557 _method_name = '__create_clusters_and_servers'
558558
559559 self .logger .entering (str (location ), class_name = self .__class_name , method_name = _method_name )
560+
560561 #
561562 # In order for source domain provisioning to work with dynamic clusters, we have to provision
562563 # the ServerTemplates. There is a cyclical dependency between Server Template and Clusters so we
563564 # need for the ServerTemplates to exist before create clusters. Once the clusters are provisioned,
564565 # then we can fully populate the ServerTemplates.
565566 #
566- server_template_nodes = dictionary_utils .get_dictionary_element (self ._topology , SERVER_TEMPLATE )
567- if len (server_template_nodes ) > 0 and self ._is_type_valid (location , SERVER_TEMPLATE ):
568- st_location = LocationContext (location ).append_location (SERVER_TEMPLATE )
569- st_mbean_type = self .alias_helper .get_wlst_mbean_type (st_location )
570- st_create_path = self .alias_helper .get_wlst_create_path (st_location )
571- self .wlst_helper .cd (st_create_path )
572-
573- st_token_name = self .alias_helper .get_name_token (st_location )
574- for server_template_name in server_template_nodes :
575- st_name = self .wlst_helper .get_quoted_name_for_wlst (server_template_name )
576- if st_token_name is not None :
577- st_location .add_name_token (st_token_name , st_name )
578-
579- st_mbean_name = self .alias_helper .get_wlst_mbean_name (st_location )
580- self .logger .info ('WLSDPLY-12220' , SERVER_TEMPLATE , st_mbean_name )
581- self .wlst_helper .create (st_mbean_name , st_mbean_type )
567+ self .topology_helper .create_placeholder_server_templates (self ._topology )
568+
569+ # create placeholders for JDBC resources that may be referenced in cluster definition.
570+ resources_dict = self .model .get_model_resources ()
571+ self .topology_helper .create_placeholder_jdbc_resources (resources_dict )
582572
583573 cluster_nodes = dictionary_utils .get_dictionary_element (self ._topology , CLUSTER )
584574 if len (cluster_nodes ) > 0 :
@@ -587,6 +577,7 @@ def __create_clusters_and_servers(self, location):
587577 #
588578 # Now, fully populate the ServerTemplates, if any.
589579 #
580+ server_template_nodes = dictionary_utils .get_dictionary_element (self ._topology , SERVER_TEMPLATE )
590581 if len (server_template_nodes ) > 0 :
591582 self ._create_named_mbeans (SERVER_TEMPLATE , server_template_nodes , location , log_created = True )
592583
0 commit comments