Fixing remote command manager exception string (removing security information)
diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/exceptions/RemoteCommandManagerException.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/exceptions/RemoteCommandManagerException.java
index 34a718b..db7d517 100644
--- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/exceptions/RemoteCommandManagerException.java
+++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/exceptions/RemoteCommandManagerException.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 1998, 2009 Oracle. All rights reserved.
+ * Copyright (c) 1998, 2011 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
@@ -12,7 +12,6 @@
******************************************************************************/
package org.eclipse.persistence.exceptions;
-import java.util.Hashtable;
import org.eclipse.persistence.exceptions.i18n.ExceptionMessageGenerator;
/**
@@ -59,9 +58,9 @@
super(theMessage);
}
- public static RemoteCommandManagerException errorObtainingContext(String contextProperties, Exception internalEx) {
+ public static RemoteCommandManagerException errorObtainingContext(Exception internalEx) {
RemoteCommandManagerException ex;
- Object[] args = { contextProperties };
+ Object[] args = { };
ex = new RemoteCommandManagerException(ExceptionMessageGenerator.buildMessage(RemoteCommandManagerException.class, ERROR_OBTAINING_CONTEXT_FOR_JNDI, args));
ex.setErrorCode(ERROR_OBTAINING_CONTEXT_FOR_JNDI);
if (internalEx != null) {
@@ -124,8 +123,8 @@
return ex;
}
- public static RemoteCommandManagerException errorCreatingJMSConnection(String topicName, String topicFactory, Hashtable contextProperties, Throwable internalEx) {
- Object[] args = { topicName, topicFactory, contextProperties };
+ public static RemoteCommandManagerException errorCreatingJMSConnection(String topicName, String topicFactory, Throwable internalEx) {
+ Object[] args = { topicName, topicFactory };
RemoteCommandManagerException ex = new RemoteCommandManagerException(ExceptionMessageGenerator.buildMessage(RemoteCommandManagerException.class, ERROR_CREATING_JMS_CONNECTION, args));
ex.setErrorCode(ERROR_CREATING_JMS_CONNECTION);
if (internalEx != null) {
@@ -172,8 +171,8 @@
return ex;
}
- public static RemoteCommandManagerException errorCreatingLocalJMSConnection(String topicName, String topicFactory, Hashtable contextProperties, Throwable internalEx) {
- Object[] args = { topicName, topicFactory, contextProperties };
+ public static RemoteCommandManagerException errorCreatingLocalJMSConnection(String topicName, String topicFactory, Throwable internalEx) {
+ Object[] args = { topicName, topicFactory };
RemoteCommandManagerException ex = new RemoteCommandManagerException(ExceptionMessageGenerator.buildMessage(RemoteCommandManagerException.class, ERROR_CREATING_LOCAL_JMS_CONNECTION, args));
ex.setErrorCode(ERROR_CREATING_LOCAL_JMS_CONNECTION);
if (internalEx != null) {
@@ -182,8 +181,8 @@
return ex;
}
- public static RemoteCommandManagerException errorCreatingOc4jJGroupsConnection(String serviceId, String topicName, String topicFactory, Hashtable contextProperties, Throwable internalEx) {
- Object[] args = { serviceId, topicName, topicFactory, contextProperties };
+ public static RemoteCommandManagerException errorCreatingOc4jJGroupsConnection(String serviceId, String topicName, String topicFactory, Throwable internalEx) {
+ Object[] args = { serviceId, topicName, topicFactory };
RemoteCommandManagerException ex = new RemoteCommandManagerException(ExceptionMessageGenerator.buildMessage(RemoteCommandManagerException.class, ERROR_CREATING_OC4J_JGROUPS_CONNECTION, args));
ex.setErrorCode(ERROR_CREATING_OC4J_JGROUPS_CONNECTION);
if (internalEx != null) {
diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/exceptions/i18n/RemoteCommandManagerExceptionResource.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/exceptions/i18n/RemoteCommandManagerExceptionResource.java
index bcbb7c2..511c0b7 100644
--- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/exceptions/i18n/RemoteCommandManagerExceptionResource.java
+++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/exceptions/i18n/RemoteCommandManagerExceptionResource.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 1998, 2009 Oracle. All rights reserved.
+ * Copyright (c) 1998, 2011 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
@@ -22,21 +22,19 @@
*/
public class RemoteCommandManagerExceptionResource extends ListResourceBundle {
static final Object[][] contents = {
- { "22101", "Could not obtain JNDI context with properties {0}" },
+ { "22101", "Could not obtain JNDI context, check your properties are set correctly." },
{ "22102", "Could not post connection in local naming service under name {0}" },
{ "22103", "Could not look up remote connection under name {0} with URL {1}" },
{ "22104", "Could not look up hostname" },
{ "22105", "Could not propagate command to {0}" },
- { "22106", "Could not create external JMS connection with Topic {0}, Topic Factory {1}, and Context properties {2}" },
+ { "22106", "Could not create external JMS connection with Topic {0} and Topic Factory {1}. Also, check your context properties are set correctly." },
{ "22107", "Could not remove local connection in local naming service under name {0}" },
-
- { "22108", "Could not serialize or desiralize command" },
-
- { "22109", "Failed to receive JMS message from JMS provider" },
+ { "22108", "Could not serialize or desiralize command" },
+ { "22109", "Failed to receive JMS message from JMS provider" },
{ "22110", "Failed to discover local host IP address." },
{ "22111", "Failed to get ServerPlatform. The ServerPlatform must be set either on Session or RemoteCommandManager." },
- { "22112", "Could not create local JMS connection with Topic {0}, Topic Factory {1}, and Context properties {2}" },
- { "22113", "Could not create Oc4jJGroupsRemoteConnection service ID {0}, topic {1}, using factory {2} and Context properties {3}." },
+ { "22112", "Could not create local JMS connection with Topic {0} and Topic Factory {1}. Also, check your context properties are set correctly." },
+ { "22113", "Could not create Oc4jJGroupsRemoteConnection service ID {0}, topic {1}, using factory {2}. Also, check your context properties are set correctly." },
{ "22114", "{0}: failed to deserialize retrieved message {1}." },
{ "22115", "{0}: failed to process remote command retrieved from message {1}, from {2}, command type {3}" },
{ "22116", "Received JMS message is null. Treating it as a JMSException" }
diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/coordination/TransportManager.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/coordination/TransportManager.java
index 3c32530..e497c6f 100644
--- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/coordination/TransportManager.java
+++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/coordination/TransportManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 1998, 2009 Oracle. All rights reserved.
+ * Copyright (c) 1998, 2011 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
@@ -217,8 +217,8 @@
try {
return new javax.naming.InitialContext(contextProperties);
} catch (NamingException exception) {
- RemoteCommandManagerException rcmException = RemoteCommandManagerException.errorObtainingContext(contextProperties.toString(), exception);
- rcm.handleException(RemoteCommandManagerException.errorObtainingContext(contextProperties.toString(), exception));
+ RemoteCommandManagerException rcmException = RemoteCommandManagerException.errorObtainingContext(exception);
+ rcm.handleException(RemoteCommandManagerException.errorObtainingContext(exception));
throw rcmException;
}
}
diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/coordination/jms/JMSTopicTransportManager.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/coordination/jms/JMSTopicTransportManager.java
index 618ae47..cc15580 100644
--- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/coordination/jms/JMSTopicTransportManager.java
+++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/coordination/jms/JMSTopicTransportManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 1998, 2009 Oracle. All rights reserved.
+ * Copyright (c) 1998, 2011 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
@@ -102,9 +102,9 @@
} catch (Exception ex) {
RemoteCommandManagerException rcmException;
if(isLocalConnectionBeingCreated) {
- rcmException = RemoteCommandManagerException.errorCreatingLocalJMSConnection(topicName, connectionFactoryName, getRemoteContextProperties(), ex);
+ rcmException = RemoteCommandManagerException.errorCreatingLocalJMSConnection(topicName, connectionFactoryName, ex);
} else {
- rcmException = RemoteCommandManagerException.errorCreatingJMSConnection(topicName, connectionFactoryName, getRemoteContextProperties(), ex);
+ rcmException = RemoteCommandManagerException.errorCreatingJMSConnection(topicName, connectionFactoryName, ex);
}
throw rcmException;
} finally {