@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 synchronized void handleLargeMessage(final ClientLargeMessageInternal clientLargeMessage, long largeMessageSize) throws Exception { if (closing) { // This is ok - we just ignore the message return; } // Flow control for the first packet, we will have others File largeMessageCache = null; if (session.isCacheLargeMessageClient()) { largeMessageCache = File.createTempFile("tmp-large-message-" + clientLargeMessage.getMessageID() + "-", ".tmp"); largeMessageCache.deleteOnExit(); } ClientSessionFactory sf = session.getSessionFactory(); ServerLocator locator = sf.getServerLocator(); long callTimeout = locator.getCallTimeout(); currentLargeMessageController = new LargeMessageControllerImpl(this, largeMessageSize, callTimeout, largeMessageCache); if (clientLargeMessage.isCompressed()) { clientLargeMessage.setLargeMessageController(new CompressedLargeMessageControllerImpl(currentLargeMessageController)); } else { clientLargeMessage.setLargeMessageController(currentLargeMessageController); } handleRegularMessage(clientLargeMessage); }
ClientSessionFactory sf = session.getSessionFactory(); ServerLocator locator = sf.getServerLocator(); long callTimeout = locator.getCallTimeout();
@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(); }
@Override public synchronized void handleLargeMessage(final ClientLargeMessageInternal clientLargeMessage, long largeMessageSize) throws Exception { if (closing) { // This is ok - we just ignore the message return; } // Flow control for the first packet, we will have others File largeMessageCache = null; if (session.isCacheLargeMessageClient()) { largeMessageCache = File.createTempFile("tmp-large-message-" + clientLargeMessage.getMessageID() + "-", ".tmp"); largeMessageCache.deleteOnExit(); } ClientSessionFactory sf = session.getSessionFactory(); ServerLocator locator = sf.getServerLocator(); long callTimeout = locator.getCallTimeout(); currentLargeMessageController = new LargeMessageControllerImpl(this, largeMessageSize, callTimeout, largeMessageCache); if (clientLargeMessage.isCompressed()) { clientLargeMessage.setLargeMessageController(new CompressedLargeMessageControllerImpl(currentLargeMessageController)); } else { clientLargeMessage.setLargeMessageController(currentLargeMessageController); } handleRegularMessage(clientLargeMessage); }
@Override public synchronized void handleLargeMessage(final ClientLargeMessageInternal clientLargeMessage, long largeMessageSize) throws Exception { if (closing) { // This is ok - we just ignore the message return; } // Flow control for the first packet, we will have others File largeMessageCache = null; if (session.isCacheLargeMessageClient()) { largeMessageCache = File.createTempFile("tmp-large-message-" + clientLargeMessage.getMessageID() + "-", ".tmp"); largeMessageCache.deleteOnExit(); } ClientSessionFactory sf = session.getSessionFactory(); ServerLocator locator = sf.getServerLocator(); long callTimeout = locator.getCallTimeout(); currentLargeMessageController = new LargeMessageControllerImpl(this, largeMessageSize, callTimeout, largeMessageCache); if (clientLargeMessage.isCompressed()) { clientLargeMessage.setLargeMessageController(new CompressedLargeMessageControllerImpl(currentLargeMessageController)); } else { clientLargeMessage.setLargeMessageController(currentLargeMessageController); } handleRegularMessage(clientLargeMessage); }
@Override public synchronized void handleLargeMessage(final ClientLargeMessageInternal clientLargeMessage, long largeMessageSize) throws Exception { if (closing) { // This is ok - we just ignore the message return; } // Flow control for the first packet, we will have others File largeMessageCache = null; if (session.isCacheLargeMessageClient()) { largeMessageCache = File.createTempFile("tmp-large-message-" + clientLargeMessage.getMessageID() + "-", ".tmp"); largeMessageCache.deleteOnExit(); } ClientSessionFactory sf = session.getSessionFactory(); ServerLocator locator = sf.getServerLocator(); long callTimeout = locator.getCallTimeout(); currentLargeMessageController = new LargeMessageControllerImpl(this, largeMessageSize, callTimeout, largeMessageCache); if (clientLargeMessage.isCompressed()) { clientLargeMessage.setLargeMessageController(new CompressedLargeMessageControllerImpl(currentLargeMessageController)); } else { clientLargeMessage.setLargeMessageController(currentLargeMessageController); } handleRegularMessage(clientLargeMessage); }
@Override public synchronized void handleLargeMessage(final ClientLargeMessageInternal clientLargeMessage, long largeMessageSize) throws Exception { if (closing) { // This is ok - we just ignore the message return; } // Flow control for the first packet, we will have others File largeMessageCache = null; if (session.isCacheLargeMessageClient()) { largeMessageCache = File.createTempFile("tmp-large-message-" + clientLargeMessage.getMessageID() + "-", ".tmp"); largeMessageCache.deleteOnExit(); } ClientSessionFactory sf = session.getSessionFactory(); ServerLocator locator = sf.getServerLocator(); long callTimeout = locator.getCallTimeout(); currentLargeMessageController = new LargeMessageControllerImpl(this, largeMessageSize, callTimeout, largeMessageCache); if (clientLargeMessage.isCompressed()) { clientLargeMessage.setLargeMessageController(new CompressedLargeMessageControllerImpl(currentLargeMessageController)); } else { clientLargeMessage.setLargeMessageController(currentLargeMessageController); } handleRegularMessage(clientLargeMessage); }
@Override public synchronized void handleLargeMessage(final ClientLargeMessageInternal clientLargeMessage, long largeMessageSize) throws Exception { if (closing) { // This is ok - we just ignore the message return; } // Flow control for the first packet, we will have others File largeMessageCache = null; if (session.isCacheLargeMessageClient()) { largeMessageCache = File.createTempFile("tmp-large-message-" + clientLargeMessage.getMessageID() + "-", ".tmp"); largeMessageCache.deleteOnExit(); } ClientSessionFactory sf = session.getSessionFactory(); ServerLocator locator = sf.getServerLocator(); long callTimeout = locator.getCallTimeout(); currentLargeMessageController = new LargeMessageControllerImpl(this, largeMessageSize, callTimeout, largeMessageCache); if (clientLargeMessage.isCompressed()) { clientLargeMessage.setLargeMessageController(new CompressedLargeMessageControllerImpl(currentLargeMessageController)); } else { clientLargeMessage.setLargeMessageController(currentLargeMessageController); } handleRegularMessage(clientLargeMessage); }
@Override public synchronized void handleLargeMessage(final ClientLargeMessageInternal clientLargeMessage, long largeMessageSize) throws Exception { if (closing) { // This is ok - we just ignore the message return; } // Flow control for the first packet, we will have others File largeMessageCache = null; if (session.isCacheLargeMessageClient()) { largeMessageCache = File.createTempFile("tmp-large-message-" + clientLargeMessage.getMessageID() + "-", ".tmp"); largeMessageCache.deleteOnExit(); } ClientSessionFactory sf = session.getSessionFactory(); ServerLocator locator = sf.getServerLocator(); long callTimeout = locator.getCallTimeout(); currentLargeMessageController = new LargeMessageControllerImpl(this, largeMessageSize, callTimeout, largeMessageCache); if (clientLargeMessage.isCompressed()) { clientLargeMessage.setLargeMessageController(new CompressedLargeMessageControllerImpl(currentLargeMessageController)); } else { clientLargeMessage.setLargeMessageController(currentLargeMessageController); } handleRegularMessage(clientLargeMessage); }
@Override protected void crash(ClientSession... sessions) throws Exception { if (sessions.length > 0) { for (ClientSession session : sessions) { waitForRemoteBackup(((ClientSessionInternal) session).getSessionFactory(), 5, true, backupServer.getServer()); } } else { waitForRemoteBackup(null, 5, true, backupServer.getServer()); } super.crash(sessions); } }
@Override protected void crash(boolean waitFailure, ClientSession... sessions) throws Exception { if (sessions.length > 0) { for (ClientSession session : sessions) { waitForRemoteBackup(((ClientSessionInternal) session).getSessionFactory(), 5, true, backupServer.getServer()); } } else { waitForRemoteBackup(null, 5, true, backupServer.getServer()); } super.crash(waitFailure, sessions); }
ClientSessionFactory sf = session.getSessionFactory(); ServerLocator locator = sf.getServerLocator(); long callTimeout = locator.getCallTimeout();
ClientSessionFactory sf = session.getSessionFactory(); ServerLocator locator = sf.getServerLocator(); long callTimeout = locator.getCallTimeout();
ClientSessionFactory sf = session.getSessionFactory(); ServerLocator locator = sf.getServerLocator(); long callTimeout = locator.getCallTimeout();