This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void resendPending() throws Exception | |
{ | |
// In case the RESET wasn't sent yet to the remote node, we may eventually miss a node send, | |
// on that case the cluster-reset information will ask the group to resend any pending information | |
try | |
{ | |
lock.lock(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#JournalFileImpl: (hornetq-data-1.hq id = 1, recordID = 1) (size=102400) | |
operation@AddRecord;recordID=9;userRecordType=31;isUpdate=false;compactCount=0;Message(messageID=9;properties=[#properties = 0] - ServerMessage[messageID=9,durable=true,userID=null,priority=4, bodySize=128,expiration=0, durable=true, address=jms.queue.mdbQueue,properties=TypedProperties[null]]@1685235300 | |
operation@Update;recordID=9;userRecordType=32;isUpdate=true;compactCount=0;AddRef;QueueEncoding [queueID=2] | |
#JournalFileImpl: (hornetq-data-2.hq id = 2, recordID = 2) (size=102400) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected HornetQRASession allocateConnection(boolean transacted, int acknowledgeMode, final int sessionType) throws JMSException | |
{ | |
if (HornetQRASessionFactoryImpl.trace) | |
{ | |
HornetQRALogger.LOGGER.trace("allocateConnection(" + transacted + | |
", " + | |
acknowledgeMode + | |
", " + | |
sessionType + | |
")"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internalClose(); | |
for (Channel channel : channels.values()) | |
{ | |
channel.returnBlocking(); | |
} | |
// Then call the listeners | |
callFailureListeners(me); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Thread newThread(final Runnable command) | |
{ | |
// attach the thread to a group only if there is no security manager: | |
// when sandboxed, the code does not have the RuntimePermission modifyThreadGroup | |
final Thread t = (Thread)AccessController.doPrivileged(new PrivilegedAction<Object>() | |
{ | |
public Object run() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void returnBlocking(Exception cause) | |
{ | |
lock.lock(); | |
try | |
{ | |
HornetQException ex = HornetQClientMessageBundle.BUNDLE.unblockingACall(); | |
ex.initCause(cause); | |
response = new HornetQExceptionMessage(ex); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (response.getType() == PacketImpl.EXCEPTION) | |
{ | |
final HornetQExceptionMessage mem = (HornetQExceptionMessage) response; | |
HornetQException e = mem.getException(); | |
Throwable cause = e.getCause(); | |
e.fillInStackTrace(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testloop() throws Exception | |
{ | |
for (int i = 0 ; i < 100; i++) | |
{ | |
System.out.println("#test " + i); | |
testForceBlockingReturn(); | |
tearDown(); | |
setUp(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void write(final ChannelHandlerContext ctx) { | |
synchronized (lock) { | |
while (true) { | |
int pending = transport.pending(); | |
if (pending > 0) { | |
final int size = pending - offset; | |
if (size > 0) { | |
ByteBuf buffer = Unpooled.buffer(size); | |
ByteBuffer head = transport.head(); |
OlderNewer