41
41
from wlsdeploy .aliases .model_constants import DRIVER_PARAMS_kEYSTORE_PROPERTY
42
42
from wlsdeploy .aliases .model_constants import JDBC_DRIVER_PARAMS_PROPERTIES
43
43
from wlsdeploy .aliases .model_constants import JDBC_SYSTEM_RESOURCE
44
+ from wlsdeploy .aliases .model_constants import LISTEN_PORT
44
45
from wlsdeploy .aliases .model_constants import LOG_FILTER
45
46
from wlsdeploy .aliases .model_constants import MACHINE
46
47
from wlsdeploy .aliases .model_constants import MIGRATABLE_TARGET
@@ -819,10 +820,12 @@ def __create_machines_clusters_and_servers(self, delete_now=True):
819
820
# Now, fully populate the ServerTemplates, if any.
820
821
#
821
822
server_template_nodes = dictionary_utils .get_dictionary_element (self ._topology , SERVER_TEMPLATE )
823
+
822
824
if len (server_template_nodes ) > 0 :
823
825
self ._create_named_mbeans (SERVER_TEMPLATE , server_template_nodes , location , log_created = True ,
824
826
delete_now = delete_now )
825
827
828
+
826
829
#
827
830
# Finally, create/update the servers.
828
831
#
@@ -832,6 +835,20 @@ def __create_machines_clusters_and_servers(self, delete_now=True):
832
835
if len (server_nodes ) > 0 :
833
836
self ._create_named_mbeans (SERVER , server_nodes , location , log_created = True , delete_now = delete_now )
834
837
838
+ # Work around for bug in WLST where Server Template Listen Port must be set after Server
839
+ # Listen Port for 7001 in order to show up in the config.xml
840
+ if len (server_template_nodes ) > 0 :
841
+ for template in server_template_nodes :
842
+ listen_port = dictionary_utils .get_dictionary_element (self ._topology [SERVER_TEMPLATE ][template ], LISTEN_PORT )
843
+ if listen_port is not None :
844
+ temp_loc = LocationContext ()
845
+ temp_loc .append_location (SERVER_TEMPLATE )
846
+ temp_loc .add_name_token (self .aliases .get_name_token (temp_loc ), template )
847
+ attribute_path = self .aliases .get_wlst_attributes_path (temp_loc )
848
+
849
+ self .wlst_helper .cd (attribute_path )
850
+ self ._set_attribute (temp_loc , LISTEN_PORT , listen_port , [])
851
+
835
852
self .__create_migratable_targets (location , delete_now = delete_now )
836
853
837
854
self .logger .exiting (class_name = self .__class_name , method_name = _method_name )
0 commit comments