Skip to content

Commit 98ed08d

Browse files
committed
Merge branch 'coherence-file-handling' into 'main'
Reworking the handling of Coherence cluster and cache config files See merge request weblogic-cloud/weblogic-deploy-tooling!1530
2 parents 0ca1ec5 + 1658a03 commit 98ed08d

File tree

30 files changed

+522
-166
lines changed

30 files changed

+522
-166
lines changed

core/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<artifactId>weblogic-deploy</artifactId>
1313
<groupId>com.oracle.weblogic.lifecycle</groupId>
14-
<version>3.3.1-SNAPSHOT</version>
14+
<version>3.4.0-SNAPSHOT</version>
1515
<relativePath>../pom.xml</relativePath>
1616
</parent>
1717

core/src/main/java/oracle/weblogic/deploy/util/WLSDeployArchive.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -4536,7 +4536,7 @@ protected String addItemToZip(String zipPathPrefix, File itemToAdd, String prefe
45364536

45374537
protected static String getURLArchiveName(String zipPathPrefix, URL url, boolean useFileNameInEntryPath) {
45384538
String newName = zipPathPrefix;
4539-
String urlFileName = new File(url.getFile()).getName();
4539+
String urlFileName = new File(url.getPath()).getName();
45404540
if (useFileNameInEntryPath) {
45414541
if (!newName.endsWith(ZIP_SEP)) {
45424542
newName += ZIP_SEP;
@@ -4550,7 +4550,7 @@ protected String addUrlToZip(String zipPathPrefix, URL url, String extension, bo
45504550
throws WLSDeployArchiveIOException {
45514551
final String METHOD = "addUrlToZip";
45524552

4553-
LOGGER.entering(CLASS, METHOD, zipPathPrefix, extension, useFileNameInEntryPath);
4553+
LOGGER.entering(CLASS, METHOD, zipPathPrefix, url, extension, useFileNameInEntryPath);
45544554
HttpURLConnection connection = null;
45554555
InputStream is = null;
45564556
File tmpFile = null;
@@ -4573,7 +4573,7 @@ protected String addUrlToZip(String zipPathPrefix, URL url, String extension, bo
45734573

45744574
fos = new FileOutputStream(tmpFile);
45754575
copyFile(is, fos);
4576-
newName = addSingleFileToZip(tmpFile, newName, METHOD);
4576+
newName = addSingleFileToZip(tmpFile, urlFileName, METHOD);
45774577
} catch (IOException ioe) {
45784578
WLSDeployArchiveIOException aioe =
45794579
new WLSDeployArchiveIOException("WLSDPLY-01410", ioe, url, ioe.getLocalizedMessage());
@@ -5005,7 +5005,9 @@ private static void closeMapInputStreams(Map<String, InputStream> map) {
50055005

50065006
private String addSingleFileToZip(File itemToAdd, String preferredName, String callingMethod)
50075007
throws WLSDeployArchiveIOException {
5008+
final String METHOD = "addSingleFileToZip";
50085009

5010+
LOGGER.entering(CLASS, METHOD, itemToAdd, preferredName, callingMethod);
50095011
String newName = null;
50105012
FileInputStream inputStream = null;
50115013
try {
@@ -5022,6 +5024,7 @@ private String addSingleFileToZip(File itemToAdd, String preferredName, String c
50225024
}
50235025
}
50245026
}
5027+
LOGGER.exiting(CLASS, METHOD, newName);
50255028
return newName;
50265029
}
50275030

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
CLUSTER = 'Cluster'
4242
CLUSTER_MESSAGING_MODE = 'ClusterMessagingMode'
4343
COHERENCE_ACTIVE_DIRECTORY = 'ActiveDirectory'
44-
COHERENCE_CACHE_CONFIG_FILE = 'CacheConfigurationFile'
4544
COHERENCE_ADDRESS_PROVIDERS = 'CoherenceAddressProviders'
4645
COHERENCE_ADDRESS_PROVIDER = 'CoherenceAddressProvider'
4746
COHERENCE_CACHE = 'CoherenceCache'
4847
COHERENCE_CACHE_CONFIG = 'CoherenceCacheConfig'
48+
COHERENCE_CACHE_CONFIG_FILE = 'CacheConfigurationFile'
4949
COHERENCE_CLUSTER_SYSTEM_RESOURCE = 'CoherenceClusterSystemResource'
5050
COHERENCE_CLUSTER_PARAMS = 'CoherenceClusterParams'
5151
COHERENCE_CUSTOM_CLUSTER_CONFIGURATION = 'CustomClusterConfigurationFileName'
@@ -55,6 +55,7 @@
5555
COHERENCE_PARTITION_CACHE_CONFIGS = 'CoherencePartitionCacheConfig'
5656
COHERENCE_PERSISTENCE_PARAMS = 'CoherencePersistenceParams'
5757
COHERENCE_RESOURCE = 'CoherenceResource'
58+
COHERENCE_RUNTIME_CACHE_CONFIG_URI = 'RuntimeCacheConfigurationUri'
5859
COHERENCE_SERVICE = 'CoherenceService'
5960
COHERENCE_SNAPSHOT_DIRECTORY = 'SnapshotDirectory'
6061
COHERENCE_SOCKET_ADDRESS = 'CoherenceSocketAddress'

core/src/main/python/wlsdeploy/exception/exception_helper.py

+8
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,14 @@ def convert_error_to_exception():
456456
return custom_exception
457457

458458

459+
def get_error_message_from_exception(ex):
460+
if isinstance(ex, Throwable):
461+
message = ex.getLocalizedMessage()
462+
else:
463+
message = ex.to_string()
464+
return message
465+
466+
459467
def _return_exception_params(*args, **kwargs):
460468
"""
461469
Get the exception parameters from the list

core/src/main/python/wlsdeploy/tool/create/domain_creator.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
from wlsdeploy.aliases.model_constants import PRODUCTION_MODE_ENABLED
5959
from wlsdeploy.aliases.model_constants import RESOURCES
6060
from wlsdeploy.aliases.model_constants import RCU_COMP_INFO
61-
from wlsdeploy.aliases.model_constants import RCU_DB_INFO
6261
from wlsdeploy.aliases.model_constants import RCU_STG_INFO
6362
from wlsdeploy.aliases.model_constants import RESOURCE_GROUP
6463
from wlsdeploy.aliases.model_constants import RESOURCE_GROUP_TEMPLATE
@@ -215,7 +214,7 @@ def _create_named_mbeans(self, type_name, model_nodes, base_location, log_create
215214
:param type_name: the model folder type
216215
:param model_nodes: the model dictionary of the specified model folder type
217216
:param base_location: the base location object to use to create the MBeans
218-
:param log_created: whether or not to log created at INFO level, by default it is logged at the FINE level
217+
:param log_created: whether to log created at INFO level, by default it is logged at the FINE level
219218
:raises: CreateException: if an error occurs
220219
"""
221220
self.topology_helper.check_coherence_cluster_references(type_name, model_nodes)

0 commit comments

Comments
 (0)