Skip to content

Commit 65f1943

Browse files
Issue#639 add jpa m bean (#644)
* Fix java.lang.Boolean issues for ActiveDirectoryAuthenticator * Add support for JPA MBean * remove unused import statement * fix version range * Make generic method for domain mbean
1 parent 14cb581 commit 65f1943

File tree

6 files changed

+49
-2
lines changed

6 files changed

+49
-2
lines changed

core/src/main/python/wlsdeploy/aliases/alias_entries.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (c) 2017, 2020, Oracle Corporation and/or its affiliates. All rights reserved.
2+
Copyright (c) 2017, 2020, Oracle Corporation 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
import copy
@@ -51,6 +51,7 @@
5151
from wlsdeploy.aliases.model_constants import DOMAIN_INFO_ALIAS
5252
from wlsdeploy.aliases.model_constants import KUBERNETES_ALIAS
5353
from wlsdeploy.aliases.model_constants import JOLT_CONNECTION_POOL
54+
from wlsdeploy.aliases.model_constants import JPA
5455
from wlsdeploy.aliases.model_constants import KUBERNETES
5556
from wlsdeploy.aliases.model_constants import ODL_CONFIGURATION
5657
from wlsdeploy.aliases.model_constants import OHS
@@ -93,6 +94,7 @@ class AliasEntries(object):
9394
'Cluster',
9495
'EmbeddedLDAP',
9596
'JMX',
97+
JPA,
9698
'JTA',
9799
'Log',
98100
'LogFilter',

core/src/main/python/wlsdeploy/aliases/model_constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
JMX_NOTIFICATION = 'JMXNotification'
151151
JNDI_NAME = 'JNDIName'
152152
JNDI_PROPERTY = 'JNDIProperty'
153+
JPA = 'JPA'
153154
JTA = 'JTA'
154155
JTA_PARTITION = 'JtaPartition'
155156
JTA_MIGRATABLE_TARGET = 'JTAMigratableTarget'

core/src/main/python/wlsdeploy/tool/discover/discoverer.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,24 @@ def __init__(self, model_context, base_location, wlst_mode, aliases=None, variab
6464
self._mbean_utils = MBeanUtils(self._model_context, self._alias_helper, ExceptionType.DISCOVER)
6565
self._wls_version = self._weblogic_helper.get_actual_weblogic_version()
6666

67+
def discover_domain_mbean(self, model_top_folder_name):
68+
"""
69+
Discover the domain specific MBean and its configuration attributes.
70+
:return: model name for domain MBean:dictionary containing the discovered Domain MBean attributes
71+
"""
72+
_method_name = 'discover_domain_mbean'
73+
_logger.entering(model_top_folder_name, class_name=_class_name, method_name=_method_name)
74+
result = OrderedDict()
75+
location = LocationContext(self._base_location)
76+
location.append_location(model_top_folder_name)
77+
name = self._find_singleton_name_in_folder(location)
78+
if name is not None:
79+
_logger.info('WLSDPLY-06644', model_top_folder_name, class_name=_class_name, method_name=_method_name)
80+
location.add_name_token(self._alias_helper.get_name_token(location), name)
81+
self._populate_model_parameters(result, location)
82+
_logger.exiting(class_name=_class_name, method_name=_method_name)
83+
return model_top_folder_name, result
84+
6785
# methods for use only by the subclasses
6886
def _populate_model_parameters(self, dictionary, location):
6987
"""

core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (c) 2017, 2020, Oracle Corporation and/or its affiliates. All rights reserved.
2+
Copyright (c) 2017, 2020, Oracle Corporation 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
from java.io import File
@@ -291,6 +291,8 @@ def discover_domain_parameters(self):
291291
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
292292
model_folder_name, folder_result = self._get_nm_properties()
293293
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
294+
model_folder_name, folder_result = self.discover_domain_mbean(model_constants.JPA)
295+
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
294296

295297
_logger.exiting(class_name=_class_name, method_name=_method_name)
296298

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"copyright": "Copyright (c) 2020, Oracle Corporation and/or its affiliates.",
3+
"license": "Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl",
4+
"wlst_type": "JPA",
5+
"child_folders_type": "single_unpredictable",
6+
"default_name_value": "${NO_NAME_0:%DOMAIN%}",
7+
"folder_params": [{
8+
"version": "[10,12.1.3)",
9+
"wlst_mode": "online"
10+
}, {
11+
"version": "[12.1.3,)"
12+
}],
13+
"folders": {},
14+
"attributes": {
15+
"DefaultJpaProvider": [ {"version": "[10,12.1.3)", "wlst_mode": "online", "wlst_name": "DefaultJPAProvider", "wlst_path": "WP001", "value": {"default": "org.eclipse.persistence.jpa.PersistenceProvider" }, "wlst_type": "string" } ,
16+
{"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "Default${Jpa:JPA}Provider", "wlst_path": "WP001", "value": {"default": "org.eclipse.persistence.jpa.PersistenceProvider" }, "wlst_type": "string" } ],
17+
"Notes": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ]
18+
},
19+
"wlst_attributes_path": "WP001",
20+
"wlst_paths": {
21+
"WP001": "/JPA/%JPA%"
22+
}
23+
}

core/src/main/resources/oracle/weblogic/deploy/messages/wlsdeploy_rb.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,7 @@ WLSDPLY-06642=Custom Keystore file {0} at location {1} is a kss type which is no
728728
The Custom Keystore file will not be added to the archive file. Use export / import to \
729729
add the file to the target domain
730730
WLSDPLY-06643=Adding Domain CdiContainer
731+
WLSDPLY-06644=Adding Domain {0}
731732

732733

733734
# multi_tenant_discoverer.py, multi_tenant_resources_dsi

0 commit comments

Comments
 (0)