Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
View | Details | Raw Unified | Return to bug 983
Collapse All | Expand All

(-)a/core/src/main/java/org/jacorb/orb/Delegate.java (-19 / +24 lines)
Lines 749-765 public final class Delegate Link Here
749
            * }
749
            * }
750
            **/
750
            **/
751
751
752
            if (piorLastFailed != null && piorLastFailed.equals(pior))
753
            {
754
                    //we've already failed to bind to the ior
755
                    throw new org.omg.CORBA.TRANSIENT();
756
            }
757
758
            if (piorOriginal == null)
752
            if (piorOriginal == null)
759
            {
753
            {
760
                //keep original pior for fallback
754
                //keep original pior for fallback
761
                piorOriginal = _pior;
755
                piorOriginal = _pior;
762
            }
756
            }
757
            else if (piorOriginal.equals(_pior) && piorLastFailed != null && piorLastFailed.equals(pior))
758
            {
759
                //we've already failed to rebind to this pior
760
                throw new org.omg.CORBA.TRANSIENT();
761
            }
763
762
764
            _pior = pior;
763
            _pior = pior;
765
764
Lines 1729-1755 public final class Delegate Link Here
1729
                    logger.debug("Delegate: falling back to original IOR");
1728
                    logger.debug("Delegate: falling back to original IOR");
1730
                }
1729
                }
1731
1730
1732
                //keep last failed ior to detect forwarding loops
1731
                ParsedIOR piorCurrent = getParsedIOR();
1733
                piorLastFailed = getParsedIOR();
1732
                Profile newProfile = null;
1734
                if (piorOriginal.equals(piorLastFailed) && getParsedIOR().getProfiles().size() > 1)
1733
                if (piorCurrent.equals(piorOriginal)) {
1735
                {
1734
                    if ( piorCurrent.getProfiles().size() > 1 && ( (useJacORBIMR && ! isJacORBImR) || (useTaoIMR) || piorCurrent.isNameServiceIor() ) ) {
1736
                    if ( (useJacORBIMR && ! isJacORBImR) || (useTaoIMR) || getParsedIOR().isNameServiceIor() )
1737
                    {
1738
                        if( logger.isDebugEnabled())
1735
                        if( logger.isDebugEnabled())
1739
                        {
1736
                        {
1740
                            logger.debug(
1737
                            logger.debug(
1741
                                    "Delegate.try_rebind: binding to next profile <" +
1738
                                    "Delegate.try_rebind: binding to next profile <" +
1742
                                    getParsedIOR().getTypeIdName() + ">");
1739
                                    getParsedIOR().getTypeIdName() + ">");
1743
                        }
1740
                        }
1741
                        newProfile = getParsedIOR().getNextEffectiveProfile();
1742
                    }
1743
                    else
1744
                    {
1745
                        // already bound to the original, notify rebind failed
1746
                        return false;
1747
                    }
1748
                }
1744
1749
1745
                        Profile newProfile = getParsedIOR().getNextEffectiveProfile();
1750
                // save last failed ior to avoid loop due to forwarding to a
1751
                // same dead ior from the original one.
1752
                piorLastFailed = piorCurrent;
1746
1753
1747
                        if (newProfile != null)
1754
                if (newProfile != null)
1748
                        {
1755
                {
1749
                            piorLastFailed = null;
1756
                    piorLastFailed = null;
1750
                            randomMilliSecDelay();
1757
                    randomMilliSecDelay();
1751
                        }
1752
                    }
1753
                }
1758
                }
1754
1759
1755
                //rebind to the original ior
1760
                //rebind to the original ior

Return to bug 983