[jboss-svn-commits] JBL Code SVN: r37551 - in labs/jbosstm/branches/JBOSSTS_4_15_0_Final/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna: logging and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat Oct 15 04:34:45 EDT 2011
Author: tomjenkinson
Date: 2011-10-15 04:34:44 -0400 (Sat, 15 Oct 2011)
New Revision: 37551
Modified:
labs/jbosstm/branches/JBOSSTS_4_15_0_Final/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoreEnvironmentBean.java
labs/jbosstm/branches/JBOSSTS_4_15_0_Final/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/logging/arjunaI18NLogger.java
Log:
JBTM-916 updated with correct error messages for logging invalid node names
Modified: labs/jbosstm/branches/JBOSSTS_4_15_0_Final/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoreEnvironmentBean.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_15_0_Final/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoreEnvironmentBean.java 2011-10-15 08:27:11 UTC (rev 37550)
+++ labs/jbosstm/branches/JBOSSTS_4_15_0_Final/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoreEnvironmentBean.java 2011-10-15 08:34:44 UTC (rev 37551)
@@ -23,6 +23,7 @@
import com.arjuna.ats.internal.arjuna.common.ClassloadingUtility;
import com.arjuna.common.internal.util.propertyservice.PropertyPrefix;
import com.arjuna.common.internal.util.propertyservice.FullPropertyName;
+import com.arjuna.ats.arjuna.logging.tsLogger;
import com.arjuna.ats.arjuna.utils.Utility;
import com.arjuna.common.util.ConfigurationInfo;
import com.arjuna.ats.arjuna.utils.Process;
@@ -105,9 +106,14 @@
public void setNodeIdentifier(int nodeIdentifier) throws CoreEnvironmentBeanException
{
if (nodeIdentifier < 1) {
- throw new CoreEnvironmentBeanException("The node identifier was set to a value less than 1");
+ throw new CoreEnvironmentBeanException(tsLogger.i18NLogger.get_node_identifier_invalid(nodeIdentifier));
}
+
+ if (this.nodeIdentifierSet) {
+ throw new CoreEnvironmentBeanException(tsLogger.i18NLogger.get_node_identifier_reset_attempt());
+ }
this.nodeIdentifier = nodeIdentifier;
+ this.nodeIdentifierSet = true;
}
/**
Modified: labs/jbosstm/branches/JBOSSTS_4_15_0_Final/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/logging/arjunaI18NLogger.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_15_0_Final/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/logging/arjunaI18NLogger.java 2011-10-15 08:27:11 UTC (rev 37550)
+++ labs/jbosstm/branches/JBOSSTS_4_15_0_Final/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/logging/arjunaI18NLogger.java 2011-10-15 08:34:44 UTC (rev 37551)
@@ -1446,6 +1446,12 @@
@Message(id = 12367, value = "Failed to create store dir {0}", format = MESSAGE_FORMAT)
public String get_dir_create_failed(String arg0);
+ @Message(id = 12368, value = "The node identifier was set to a value less than 1: {0}", format = MESSAGE_FORMAT)
+ public String get_node_identifier_invalid(int nodeIdentifier);
+
+ @Message(id = 12369, value = "The node identifier was already set", format = MESSAGE_FORMAT)
+ public String get_node_identifier_reset_attempt();
+
/*
Allocate new messages directly above this notice.
- id: use the next id number in numeric sequence. Don't reuse ids.
More information about the jboss-svn-commits
mailing list