49
49
from wlsdeploy .exception import exception_helper
50
50
from wlsdeploy .exception .expection_types import ExceptionType
51
51
from wlsdeploy .tool .create .creator import Creator
52
- from wlsdeploy .tool .create .security_provider_handler import SecurityProviderHandler
52
+ from wlsdeploy .tool .create .security_provider_creator import SecurityProviderCreator
53
53
from wlsdeploy .tool .deploy import model_deployer
54
54
from wlsdeploy .tool .util .archive_helper import ArchiveHelper
55
55
from wlsdeploy .tool .util .library_helper import LibraryHelper
@@ -80,7 +80,7 @@ def __init__(self, model_dictionary, model_context, aliases):
80
80
raise ex
81
81
82
82
self .topology_helper = TopologyHelper (self .aliases , ExceptionType .CREATE , self .logger )
83
- self .security_provider_creator = SecurityProviderHandler (model_dictionary , model_context , aliases ,
83
+ self .security_provider_creator = SecurityProviderCreator (model_dictionary , model_context , aliases ,
84
84
ExceptionType .CREATE , self .logger )
85
85
86
86
self ._domain_typedef = self .model_context .get_domain_typedef ()
@@ -248,13 +248,6 @@ def __create_domain(self):
248
248
self .__create_base_domain (self ._domain_home )
249
249
self .__extend_domain (self ._domain_home )
250
250
251
- # SecurityConfiguration is special since the subfolder name does not change when you change the domain name.
252
- # It only changes once the domain is written and re-read...
253
- location = LocationContext ()
254
- domain_name_token = self .alias_helper .get_name_token (location )
255
- security_config_location = LocationContext ().add_name_token (domain_name_token , self ._domain_name )
256
- self .security_provider_creator .create_security_configuration (security_config_location )
257
-
258
251
if len (self .files_to_extract_from_archive ) > 0 :
259
252
for file_to_extract in self .files_to_extract_from_archive :
260
253
self .archive_helper .extract_file (file_to_extract )
@@ -272,6 +265,7 @@ def __deploy(self):
272
265
self .model_context .set_domain_home (self ._domain_home )
273
266
self .wlst_helper .read_domain (self ._domain_home )
274
267
self .__set_domain_attributes ()
268
+ self ._configure_security_configuration ()
275
269
self .__deploy_resources_and_apps ()
276
270
self .wlst_helper .update_domain ()
277
271
self .wlst_helper .close_domain ()
@@ -835,8 +829,7 @@ def __set_admin_server_name(self):
835
829
836
830
def __set_domain_attributes (self ):
837
831
"""
838
- Set the Domain attributes, which are in the top folder
839
- :param location: current location context
832
+ Set the Domain attributes
840
833
"""
841
834
_method_name = '__set_domain_attributes'
842
835
self .logger .finer ('WLSDPLY-12231' , self ._domain_name , class_name = self .__class_name , method_name = _method_name )
@@ -848,3 +841,20 @@ def __set_domain_attributes(self):
848
841
self .wlst_helper .cd (attribute_path )
849
842
self ._set_attributes (location , attrib_dict )
850
843
return
844
+
845
+ def _configure_security_configuration (self ):
846
+ """
847
+ Configure the SecurityConfiguration MBean and its Realm sub-folder. In 11g, the SecurityConfiguration MBean
848
+ is not persisted to the domain config until the domain is first written.
849
+ :return:
850
+ """
851
+ _method_name = '_configure_security_configuration'
852
+ self .logger .entering (class_name = self .__class_name , method_name = _method_name )
853
+ # SecurityConfiguration is special since the subfolder name does not change when you change the domain name.
854
+ # It only changes once the domain is written and re-read...
855
+ location = LocationContext ()
856
+ domain_name_token = self .alias_helper .get_name_token (location )
857
+ security_config_location = LocationContext ().add_name_token (domain_name_token , self ._domain_name )
858
+ self .security_provider_creator .create_security_configuration (security_config_location )
859
+ self .logger .exiting (class_name = self .__class_name , method_name = _method_name )
860
+ return
0 commit comments