private ClientSessionInternal getSessionInternalFromXAResource(final XAResource xares) { if (xares == null) { return null; } if (xares instanceof ClientSessionInternal) { return (ClientSessionInternal) xares; } else if (xares instanceof ActiveMQXAResource) { return getSessionInternalFromXAResource(((ActiveMQXAResource) xares).getResource()); } return null; }
@Override public boolean isSameRM(final XAResource xares) throws XAException { checkXA(); if (forceNotSameRM) { return false; } ClientSessionInternal other = getSessionInternalFromXAResource(xares); if (other == null) { return false; } String liveNodeId = sessionFactory.getLiveNodeId(); String otherLiveNodeId = ((ClientSessionFactoryInternal) other.getSessionFactory()).getLiveNodeId(); if (liveNodeId != null && otherLiveNodeId != null) { return liveNodeId.equals(otherLiveNodeId); } //we shouldn't get here, live node id should always be set return sessionFactory == other.getSessionFactory(); }
private ClientSessionInternal getSessionInternalFromXAResource(final XAResource xares) { if (xares == null) { return null; } if (xares instanceof ClientSessionInternal) { return (ClientSessionInternal) xares; } else if (xares instanceof ActiveMQXAResource) { return getSessionInternalFromXAResource(((ActiveMQXAResource) xares).getResource()); } return null; }
private ClientSessionInternal getSessionInternalFromXAResource(final XAResource xares) { if (xares == null) { return null; } if (xares instanceof ClientSessionInternal) { return (ClientSessionInternal) xares; } else if (xares instanceof ActiveMQXAResource) { return getSessionInternalFromXAResource(((ActiveMQXAResource) xares).getResource()); } return null; }
private ClientSessionInternal getSessionInternalFromXAResource(final XAResource xares) { if (xares == null) { return null; } if (xares instanceof ClientSessionInternal) { return (ClientSessionInternal) xares; } else if (xares instanceof ActiveMQXAResource) { return getSessionInternalFromXAResource(((ActiveMQXAResource) xares).getResource()); } return null; }
private ClientSessionInternal getSessionInternalFromXAResource(final XAResource xares) { if (xares == null) { return null; } if (xares instanceof ClientSessionInternal) { return (ClientSessionInternal) xares; } else if (xares instanceof ActiveMQXAResource) { return getSessionInternalFromXAResource(((ActiveMQXAResource) xares).getResource()); } return null; }
private ClientSessionInternal getSessionInternalFromXAResource(final XAResource xares) { if (xares == null) { return null; } if (xares instanceof ClientSessionInternal) { return (ClientSessionInternal) xares; } else if (xares instanceof ActiveMQXAResource) { return getSessionInternalFromXAResource(((ActiveMQXAResource) xares).getResource()); } return null; }
private ClientSessionInternal getSessionInternalFromXAResource(final XAResource xares) { if (xares == null) { return null; } if (xares instanceof ClientSessionInternal) { return (ClientSessionInternal) xares; } else if (xares instanceof ActiveMQXAResource) { return getSessionInternalFromXAResource(((ActiveMQXAResource) xares).getResource()); } return null; }
@Override public boolean isSameRM(final XAResource xares) throws XAException { checkXA(); if (forceNotSameRM) { return false; } ClientSessionInternal other = getSessionInternalFromXAResource(xares); if (other == null) { return false; } String liveNodeId = sessionFactory.getLiveNodeId(); String otherLiveNodeId = ((ClientSessionFactoryInternal) other.getSessionFactory()).getLiveNodeId(); if (liveNodeId != null && otherLiveNodeId != null) { return liveNodeId.equals(otherLiveNodeId); } //we shouldn't get here, live node id should always be set return sessionFactory == other.getSessionFactory(); }
@Override public boolean isSameRM(final XAResource xares) throws XAException { checkXA(); if (forceNotSameRM) { return false; } ClientSessionInternal other = getSessionInternalFromXAResource(xares); if (other == null) { return false; } String liveNodeId = sessionFactory.getLiveNodeId(); String otherLiveNodeId = ((ClientSessionFactoryInternal) other.getSessionFactory()).getLiveNodeId(); if (liveNodeId != null && otherLiveNodeId != null) { return liveNodeId.equals(otherLiveNodeId); } //we shouldn't get here, live node id should always be set return sessionFactory == other.getSessionFactory(); }
@Override public boolean isSameRM(final XAResource xares) throws XAException { checkXA(); if (forceNotSameRM) { return false; } ClientSessionInternal other = getSessionInternalFromXAResource(xares); if (other == null) { return false; } String liveNodeId = sessionFactory.getLiveNodeId(); String otherLiveNodeId = ((ClientSessionFactoryInternal) other.getSessionFactory()).getLiveNodeId(); if (liveNodeId != null && otherLiveNodeId != null) { return liveNodeId.equals(otherLiveNodeId); } //we shouldn't get here, live node id should always be set return sessionFactory == other.getSessionFactory(); }
@Override public boolean isSameRM(final XAResource xares) throws XAException { checkXA(); if (forceNotSameRM) { return false; } ClientSessionInternal other = getSessionInternalFromXAResource(xares); if (other == null) { return false; } String liveNodeId = sessionFactory.getLiveNodeId(); String otherLiveNodeId = ((ClientSessionFactoryInternal) other.getSessionFactory()).getLiveNodeId(); if (liveNodeId != null && otherLiveNodeId != null) { return liveNodeId.equals(otherLiveNodeId); } //we shouldn't get here, live node id should always be set return sessionFactory == other.getSessionFactory(); }
@Override public boolean isSameRM(final XAResource xares) throws XAException { checkXA(); if (forceNotSameRM) { return false; } ClientSessionInternal other = getSessionInternalFromXAResource(xares); if (other == null) { return false; } String liveNodeId = sessionFactory.getLiveNodeId(); String otherLiveNodeId = ((ClientSessionFactoryInternal) other.getSessionFactory()).getLiveNodeId(); if (liveNodeId != null && otherLiveNodeId != null) { return liveNodeId.equals(otherLiveNodeId); } //we shouldn't get here, live node id should always be set return sessionFactory == other.getSessionFactory(); }
@Override public boolean isSameRM(final XAResource xares) throws XAException { checkXA(); if (forceNotSameRM) { return false; } ClientSessionInternal other = getSessionInternalFromXAResource(xares); if (other == null) { return false; } String liveNodeId = sessionFactory.getLiveNodeId(); String otherLiveNodeId = ((ClientSessionFactoryInternal) other.getSessionFactory()).getLiveNodeId(); if (liveNodeId != null && otherLiveNodeId != null) { return liveNodeId.equals(otherLiveNodeId); } //we shouldn't get here, live node id should always be set return sessionFactory == other.getSessionFactory(); }