[jboss-svn-commits] JBL Code SVN: r17974 - labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/client.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat Jan 19 05:24:00 EST 2008
Author: mark.little at jboss.com
Date: 2008-01-19 05:24:00 -0500 (Sat, 19 Jan 2008)
New Revision: 17974
Modified:
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java
Log:
http://jira.jboss.com/jira/browse/JBESB-1501
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java 2008-01-19 06:20:19 UTC (rev 17973)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java 2008-01-19 10:24:00 UTC (rev 17974)
@@ -263,6 +263,7 @@
*/
private Message post(Message message, EPRInvoker eprInvoker) throws MessageDeliverException, FaultMessageException {
boolean staleEPRCache = true;
+ boolean initialPass = true;
//We are removing dead EPRs from the serviceClusterInfo. *Previous* deliveries maybe have
//removed EPRs that have now come back to life. We should try once more to pull a fresh list of EPRS
//from the registry before we give up (and fail-over to redelivery at a later time in the care
@@ -273,7 +274,22 @@
while (staleEPRCache) {
if ((serviceClusterInfo.getEPRs().size() == 0) || (new Date().after(expirationDate))) {
loadServiceClusterInfo();
- staleEPRCache=false;
+
+ if (initialPass && (serviceClusterInfo.getEPRs().size() == 0)) // zero from a previoud send
+ {
+ /*
+ * We need to check to see if this instance used up all of it's attempts to deliver
+ * in a previous deliver or we'll only refresh the cache once per subsequent send
+ * because we will have exhausted the EPRs in the cache, i.e., size==0.
+ *
+ * When the instance is originally created we do an initial cache fetch. Until this
+ * check, that cache fetch was not being done again after a complete failure. Unlikely
+ * to cause problems anyway, but possible.
+ */
+ initialPass = false;
+ }
+ else
+ staleEPRCache = false;
}
Message replyMessage;
EPR epr;
More information about the jboss-svn-commits
mailing list