rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
else return new Font("Dialog", Font.PLAIN, 12); | return null; | public Font getFont() { Font f = font; if (f != null) return f; Component p = parent; if (p != null) return p.getFont(); else return new Font("Dialog", Font.PLAIN, 12); } |
{ | public void hide() { if (isVisible()) { // Avoid NullPointerExceptions by creating a local reference. ComponentPeer currentPeer=peer; if (currentPeer != null) currentPeer.setVisible(false); this.visible = false; // Invalidate the parent if we have... | |
currentParent.repaint(); } | public void hide() { if (isVisible()) { // Avoid NullPointerExceptions by creating a local reference. ComponentPeer currentPeer=peer; if (currentPeer != null) currentPeer.setVisible(false); this.visible = false; // Invalidate the parent if we have... | |
} | public void removeNotify() { // We null our peer field before disposing of it, such that if we're // not the event dispatch thread and the dispatch thread is awoken by // the dispose call, there will be no race checking the peer's null // status. ComponentPeer tmp = peer; peer = null; if (tmp != n... | |
{ | public void show() { // We must set visible before showing the peer. Otherwise the // peer could post paint events before visible is true, in which // case lightweight components are not initially painted -- // Container.paint first calls isShowing () before painting itself // and its children. if... | |
currentParent.repaint(); } | public void show() { // We must set visible before showing the peer. Otherwise the // peer could post paint events before visible is true, in which // case lightweight components are not initially painted -- // Container.paint first calls isShowing () before painting itself // and its children. if... | |
public synchronized void print (char ch) | private synchronized void print (String str, boolean println) | public synchronized void print (char ch) { print(new char[]{ch}, 0, 1, false); } |
print(new char[]{ch}, 0, 1, false); | try { writeChars(str, 0, str.length()); if (println) writeChars(line_separator, 0, line_separator.length); if (auto_flush) flush(); } catch (InterruptedIOException iioe) { Thread.currentThread().interrupt(); } catch (IOException e) { setError (); } | public synchronized void print (char ch) { print(new char[]{ch}, 0, 1, false); } |
ConnectionFactory cf = (JBossConnectionFactory)ic.lookup("/ConnectionFactory"); Queue queue = (Queue)ic.lookup("/queue/Queue"); drainDestination(cf, queue); | protected void setUp() throws Exception { super.setUp(); ServerManagement.start("all"); ic = new InitialContext(ServerManagement.getJNDIEnvironment()); ServerManagement.undeployQueue("Queue"); ServerManagement.undeployTopic("Topic"); ServerManagement.deployQueue("Queue"); ServerM... | |
drainDestination(cf, queue); | public void testForeignByteMessage() throws Exception { ConnectionFactory cf = (JBossConnectionFactory)ic.lookup("/ConnectionFactory"); Connection c = cf.createConnection(); Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE); Queue queue = (Queue)ic.lookup("/queue/Queue"); Messa... | |
return formatData; | return (DateFormatSymbols) formatData.clone(); | public DateFormatSymbols getDateFormatSymbols() { return formatData; } |
if (formatData == null) { throw new NullPointerException("The supplied format data was null."); } | public void setDateFormatSymbols(DateFormatSymbols formatData) { this.formatData = formatData; } | |
xaResource = new JBossXAResource(parent.getResourceManager(), delegate, this); | public SessionState(ConnectionState parent, SessionDelegate delegate, boolean transacted, int ackMode, boolean xa) { super(parent, delegate); children = new HashSet(); this.acknowledgeMode = ackMode; this.transacted = transacted; this.xa = xa; if (transacted) { ... | |
Object Xid = parent.getResourceManager().createLocalTx(); xaResource.setCurrentTxID(Xid); | currentTxId = parent.getResourceManager().createLocalTx(); | public SessionState(ConnectionState parent, SessionDelegate delegate, boolean transacted, int ackMode, boolean xa) { super(parent, delegate); children = new HashSet(); this.acknowledgeMode = ackMode; this.transacted = transacted; this.xa = xa; if (transacted) { ... |
Node parent = box.getNode().getParentNode(); | public static void setupVerticalAlign(Context c, CalculatedStyle style, InlineBox box) { Node node = box.getNode(); // get the parent node for styling Node parent = box.getNode().getParentNode(); Element elem = null; if (box.getNode().getNodeType() == box.getNode().TEXT_NODE) { ... | |
Element elem = null; if (box.getNode().getNodeType() == box.getNode().TEXT_NODE) { parent = parent.getParentNode(); elem = (Element) box.getNode().getParentNode(); } else { elem = (Element) box.getNode(); } CalculatedStyle parent_style = c.css.getStyle(LineBreaker.getElement(parent)); Font parent_font = FontUtil.getFo... | Font parent_font = FontUtil.getFont(c, style); | public static void setupVerticalAlign(Context c, CalculatedStyle style, InlineBox box) { Node node = box.getNode(); // get the parent node for styling Node parent = box.getNode().getParentNode(); Element elem = null; if (box.getNode().getNodeType() == box.getNode().TEXT_NODE) { ... |
newBox.setStyle(box.getStyle()); | public InlineBox copy() { InlineTextBox newBox = new InlineTextBox(); InlineTextBox box = this; newBox.x = box.x; newBox.y = box.y; newBox.contentWidth = box.contentWidth; newBox.leftPadding = box.leftPadding; newBox.rightPadding = box.rightPadding; newBox.hei... | |
return _asPoint; | Point pt = null; if (_bgPosIsAbsolute) { if ( _asPoint == null ) { _asPoint = new Point(); float xF = calcFloatProportionalValue(_bgPosXValue, _bgPosXType, parentWidth); float yF = calcFloatProportionalValue(_bgPosYValue, _bgPosYType, parentHeight); _asPoint.setLocation(xF, yF); } pt = _asPoint; } else { pt = new Poin... | public Point asPoint( float parentWidth, float parentHeight ) { return _asPoint; /* * // KEEP: this was a version where bgpos was calculated relative to containing size * // however in BackgroundPainter, the value is requested as a percentage...not sure that * // is always vali... |
float x = new Float( xAsString ).floatValue(); | _bgPosXValue = new Float( xAsString ).floatValue(); _bgPosXType = ValueConstants.sacPrimitiveTypeForString( m.group( 3 ) ); | private void pullPointValuesForBGPos( CSSPrimitiveValue primitive ) { String cssText = primitive.getCssText(); String[] pos = cssText.split( " " ); try { Matcher m = CSS_LENGTH_PATTERN.matcher( pos[0] ); m.matches(); String xAsString = m.group( 1 ); f... |
float y = new Float( yAsString ).floatValue(); _asPoint = new Point(); _asPoint.setLocation( x, y ); | _bgPosYValue = new Float( yAsString ).floatValue(); _bgPosYType = ValueConstants.sacPrimitiveTypeForString( m.group( 3 ) ); if ( ValueConstants.isAbsoluteUnit( _bgPosXType ) && ValueConstants.isAbsoluteUnit( _bgPosYType ) ) { _bgPosIsAbsolute = true; } else { _bgPosIsAbsolute = false; } | private void pullPointValuesForBGPos( CSSPrimitiveValue primitive ) { String cssText = primitive.getCssText(); String[] pos = cssText.split( " " ); try { Matcher m = CSS_LENGTH_PATTERN.matcher( pos[0] ); m.matches(); String xAsString = m.group( 1 ); f... |
valid = new Boolean(DIGEST0.equals(Util.toString(new Tiger().digest()))); | valid = Boolean.valueOf(DIGEST0.equals(Util.toString(new Tiger().digest()))); | public boolean selfTest() { if (valid == null) { valid = new Boolean(DIGEST0.equals(Util.toString(new Tiger().digest()))); } return valid.booleanValue(); } |
public MessageCallbackHandler() | public MessageCallbackHandler(boolean isCC) | public MessageCallbackHandler() { this.messages = new BoundedBuffer(capacity); } |
this.messages = new BoundedBuffer(capacity); } | this.messages = new BoundedBuffer(capacity); this.isConnectionConsumer = isCC; } | public MessageCallbackHandler() { this.messages = new BoundedBuffer(capacity); } |
jm.setSessionDelegate(sessionDelegate); | if (!this.isConnectionConsumer) { jm.setSessionDelegate(sessionDelegate); } | public void handleCallback(Callback callback) throws HandleCallbackException { if (log.isTraceEnabled()) { log.trace("receiving message " + callback.getParameter() + " from the remoting layer"); } Message m = (Message)callback.getParameter(); try { JBossMessage jm = (JBossMessa... |
sessionDelegate.postDeliver(m.getJMSMessageID(), receiverID); | if (!this.isConnectionConsumer) { sessionDelegate.postDeliver(m.getJMSMessageID(), receiverID); } | public void postDeliver(Message m) throws JMSException { sessionDelegate.postDeliver(m.getJMSMessageID(), receiverID); } |
sessionDelegate.preDeliver(m.getJMSMessageID(), receiverID); | if (!this.isConnectionConsumer) { sessionDelegate.preDeliver(m.getJMSMessageID(), receiverID); } | public void preDeliver(Message m) throws JMSException { sessionDelegate.preDeliver(m.getJMSMessageID(), receiverID); } |
pooledExecutor = new PooledExecutor(new LinkedQueue(), 100); pooledExecutor.setMinimumPoolSize(100); | pooledExecutor = new PooledExecutor(new LinkedQueue(), 50); pooledExecutor.setMinimumPoolSize(50); | public ConnectionState(ConnectionDelegate delegate, String serverId) { super(null, delegate); children = new SyncSet(new HashSet(), new WriterPreferenceReadWriteLock()); resourceManager = ResourceManagerFactory.instance.getResourceManager(serverId); //TODO size should be configurable ... |
if (new_inline instanceof InlineTextBox) { start = ((InlineTextBox) new_inline).end_index; } | public static void layoutContent(Context c, Box box, List contentList) { // Uu.p("+ InlineLayout.layoutContent(): " + box); Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; Border border = LayoutUtil.getBorder(box, c.getCurrentStyle()); Border margin = c.ge... | |
c.translate(-padding_xoff, line.baseline-inline.y-inline.height - padding_yoff); | int ty = line.baseline -inline.y - inline.height - padding_yoff + line.y ; LineMetrics lm = c.getTextRenderer().getLineMetrics(c.getGraphics(), inline.getFont(), inline.getSubstring()); ty += (int)lm.getDescent(); c.translate(-padding_xoff, ty); | public void paintPadding(Context c, LineBox line, InlineBox inline) { // paint the background //u.p("painting the padding: " + inline); //int padding_xoff = inline.totalLeftPadding(); int padding_xoff = 0; int padding_yoff = inline.totalTopPadding(); //u.p("padding yoff = "... |
c.translate(+padding_xoff, -(line.baseline-inline.y-inline.height) + padding_yoff); | c.translate(+padding_xoff, -ty); | public void paintPadding(Context c, LineBox line, InlineBox inline) { // paint the background //u.p("painting the padding: " + inline); //int padding_xoff = inline.totalLeftPadding(); int padding_xoff = 0; int padding_yoff = inline.totalTopPadding(); //u.p("padding yoff = "... |
c.getGraphics().setColor( oldcolor ); | public void paintText(Context c, int lx, int ly, int ix, int iy, InlineBox inline) { String text = inline.getSubstring(); Graphics g = c.getGraphics(); //adjust font for current settings Font oldfont = c.getGraphics().getFont(); c.getGraphics().setFont( inline.getFont() ); ... | |
c.getGraphics().setColor( oldcolor ); | public void paintText(Context c, int lx, int ly, int ix, int iy, InlineBox inline) { String text = inline.getSubstring(); Graphics g = c.getGraphics(); //adjust font for current settings Font oldfont = c.getGraphics().getFont(); c.getGraphics().setFont( inline.getFont() ); ... | |
if (currentBounds.y >= lastBounds.y && currentBounds.y < lastBounds.y + lastBounds.width) { | if (currentBounds.y >= lastBounds.y && currentBounds.y < lastBounds.y + lastBounds.height) { | private void alignToLastFloat(CssContext cssCtx, BlockFormattingContext bfc, FloatedBlockBox current, int direction) { List floats = getFloats(direction); if (floats.size() > 0) { Point offset = bfc.getOffset(); FloatedBlockBox last = (FloatedBlockBox)floats.g... |
for (int j = i+1; j < pendingFloats.size(); j++) { FloatedBlockBox following = (FloatedBlockBox)pendingFloats.get(j); following.y = block.y; } | public void floatPending(LayoutContext c, BlockFormattingContext bfc, List pendingFloats) { if (pendingFloats.size() > 0) { for (int i = 0; i < pendingFloats.size(); i++) { if (i != 0) { c.setFloatingY(0d); } FloatedBlockBox block = (... | |
public PermissionDescriptor createPermissionDescriptor(Element permission) { return new PermissionDescriptor(permission); | public PermissionDescriptor createPermissionDescriptor() { return new PermissionDescriptor(); | public PermissionDescriptor createPermissionDescriptor(Element permission) { return new PermissionDescriptor(permission); } |
bodyReadOnly = false; | public void clearBody() throws JMSException { objectBytes = null; super.clearBody(); } | |
bodyReadOnly = in.readBoolean(); | public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); isByteArray = in.readBoolean(); int length = in.readInt(); if (length < 0) { objectBytes = null; } else { objectBytes = new byte[length]; in.... | |
if (!messageReadWrite) | if (bodyReadOnly) | public void setObject(Serializable object) throws JMSException { if (!messageReadWrite) { throw new MessageNotWriteableException("setObject"); } if (object == null) { objectBytes = null; return; } try { if (object instanceof byte[]) { ... |
out.writeBoolean(bodyReadOnly); | public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); out.writeBoolean(isByteArray); if (objectBytes == null) { out.writeInt(-1); } else { out.writeInt(objectBytes.length); out.write(objectBytes); } } | |
u.on(); if ( dbcount > 50 ) { u.on(); } | public static InlineBox generateMultilineBreak( Context c, Node node, int start, String text, InlineBox prev, InlineBox prev_align, int avail ) { int extra = 0; // calc end index to most words that will fit int end = start; int dbcount =... | |
u.on(); | public static InlineBox generateMultilineBreak( Context c, Node node, int start, String text, InlineBox prev, InlineBox prev_align, int avail ) { int extra = 0; // calc end index to most words that will fit int end = start; int dbcount =... | |
box.break_after = true; | box.break_after = false; | public static InlineBox generateUnbreakableInlineBox( Context c, Node node, int start, String text, InlineBox prev, InlineBox prev_align, Font font ) { int first_word_index = text.indexOf( " ", start ); if ( first_word_index == -1 ) { first_word_index = text.length(); } String... |
CalculatedStyle(CalculatedStyle parent, CascadedStyle matched) { this(); _parent = parent; derive(matched); this._styleKey = genStyleKey(); | protected CalculatedStyle() { _derivedValuesById = new FSDerivedValue[CSSName.countCSSPrimitiveNames()]; | CalculatedStyle(CalculatedStyle parent, CascadedStyle matched) { this(); _parent = parent; derive(matched); this._styleKey = genStyleKey(); } |
connState.getResourceManager().addAck(txID, state.getSessionId(), info); | ClientSessionDelegate connectionConsumerDelegate = (ClientSessionDelegate)info.getConnectionConsumerSession(); int sessionId = connectionConsumerDelegate != null ? connectionConsumerDelegate.getID() : state.getSessionId(); connState.getResourceManager().addAck(txID, sessionId, info); | public Object handlePreDeliver(Invocation invocation) throws Throwable { SessionState state = (SessionState)getState(invocation); Object txID = state.getCurrentTxId(); if (txID != null) { // the session is non-XA and transacted, or XA and enrolled in a global transaction. An // ... |
messageIdManager = new IdManager("MESSAGE_ID", 8192, persistenceManager); | messageIdManager = new IdManager("MESSAGE_ID", 4096, persistenceManager); | public synchronized void startService() throws Exception { try { if (started) { return; } log.debug(this + " starting"); if (queuedExecutorPoolSize < 1) { throw new IllegalArgumentException("queuedExecutorPoolSize mus... |
transactionIdManager = new IdManager("TRANSACTION_ID", 4096, persistenceManager); | transactionIdManager = new IdManager("TRANSACTION_ID", 1024, persistenceManager); | public synchronized void startService() throws Exception { try { if (started) { return; } log.debug(this + " starting"); if (queuedExecutorPoolSize < 1) { throw new IllegalArgumentException("queuedExecutorPoolSize mus... |
connections = new ConcurrentReaderHashMap(); | jmsClients = new HashMap(); sessions = new HashMap(); | public SimpleConnectionManager() { connections = new ConcurrentReaderHashMap(); } |
public void start() throws Exception | public synchronized void start() throws Exception | public void start() throws Exception { getNextBigBlock(); } |
started = true; | public void start() throws Exception { getNextBigBlock(); } | |
if (log.isTraceEnabled()) { log.trace("initializing SecurityMetadataStore"); } | if (trace) { log.trace("initializing SecurityMetadataStore"); } | public void start() throws NamingException { if (log.isTraceEnabled()) { log.trace("initializing SecurityMetadataStore"); } // Get the JBoss security manager from JNDI InitialContext ic = new InitialContext(); try { Object mgr = ic.lookup(securityDomain); if (log.isTraceEna... |
if (log.isTraceEnabled()) { log.trace("JaasSecurityManager is " + mgr); } | if (trace) { log.trace("JaasSecurityManager is " + mgr); } | public void start() throws NamingException { if (log.isTraceEnabled()) { log.trace("initializing SecurityMetadataStore"); } // Get the JBoss security manager from JNDI InitialContext ic = new InitialContext(); try { Object mgr = ic.lookup(securityDomain); if (log.isTraceEna... |
valid = new Boolean(DIGEST0.equals(Util.toString(new MD2().digest()))); | valid = Boolean.valueOf(DIGEST0.equals(Util.toString(new MD2().digest()))); | public boolean selfTest() { if (valid == null) { valid = new Boolean(DIGEST0.equals(Util.toString(new MD2().digest()))); } return valid.booleanValue(); } |
while (index1 > 0 && ((GapContentPosition) positions.get(index1 - 1)).mark == offset) index1--; | void adjustPositionsInRange(int offset, int length, int incr) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); if (index1 < 0) index1 = -(index1 + 1); for (ListIterator i = positions.listIter... | |
while (index1 > 0 && ((GapContentPosition) positions.get(index1 - 1)).mark == offset) index1--; | protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(of... | |
while (index1 > 0 && ((GapContentPosition) positions.get(index1 - 1)).mark == offset) index1--; | void setPositionsInRange(int offset, int length, int value) { int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); if (index1 < 0) index1 = -(index1 + 1); for (ListIterator i = positions.listIterat... | |
catch (IllegalStateException e) | catch (javax.jms.IllegalStateException e) | public void testGetSession1() throws Exception { Connection conn = cf.createConnection(); Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); try { Session sess2 = ((XASession)sess).getSession(); fail("Should throw IllegalStateException"); } ... |
throw new IllegalStateException("This method has been deprecated and shouldn't be used"); | try { return serverPeer.getMessageIdManager().getIdBlock(size); } catch (Exception e) { throw new MessagingJMSException("Failed to get id block", e); } | public IdBlock getIdBlock(int size) throws JMSException { throw new IllegalStateException("This method has been deprecated and shouldn't be used"); } |
ConnectionDelegate createConnectionDelegate(String username, String password) | ConnectionDelegate createConnectionDelegate(String username, String password, String clientConnectionID) | ConnectionDelegate createConnectionDelegate(String username, String password) throws JMSException; |
if (!started) { throw new IllegalStateException(this + " is not started"); } | public synchronized IdBlock getIdBlock(int size) throws Exception { if (size <= 0) { throw new IllegalArgumentException("block size must be > 0"); } if (size > bigBlockSize) { throw new IllegalArgumentException("block size must be <= bigBlockSize"); } ... | |
int xoff = 0; int yoff = 0; | Rectangle rect = c.getFixedRectangle(); Graphics g = c.getGraphics(); int xoff = -rect.x; int yoff = -rect.y; | public void paintFixed( Context c, Box block ) { int xoff = 0; int yoff = 0; xoff = c.canvas.getWidth(); yoff = c.canvas.getHeight(); if ( block.right_set ) { xoff = xoff - block.width; } if ( block.bottom_set ) { //joshy: this should really be ... |
xoff = c.canvas.getWidth(); yoff = c.canvas.getHeight(); if ( block.right_set ) { xoff = xoff - block.width; | if(block.top_set) { yoff += block.top; | public void paintFixed( Context c, Box block ) { int xoff = 0; int yoff = 0; xoff = c.canvas.getWidth(); yoff = c.canvas.getHeight(); if ( block.right_set ) { xoff = xoff - block.width; } if ( block.bottom_set ) { //joshy: this should really be ... |
if ( block.bottom_set ) { yoff = c.viewport.getHeight(); yoff = yoff - block.height; yoff = yoff - c.getExtents().y; yoff = yoff - c.canvas.getLocation().y; | if(block.right_set) { xoff = -rect.x + rect.width - block.width - block.right; | public void paintFixed( Context c, Box block ) { int xoff = 0; int yoff = 0; xoff = c.canvas.getWidth(); yoff = c.canvas.getHeight(); if ( block.right_set ) { xoff = xoff - block.width; } if ( block.bottom_set ) { //joshy: this should really be ... |
if(block.left_set) { xoff = block.left; } if(block.bottom_set) { yoff = -rect.y + rect.height - block.height - block.bottom; } | public void paintFixed( Context c, Box block ) { int xoff = 0; int yoff = 0; xoff = c.canvas.getWidth(); yoff = c.canvas.getHeight(); if ( block.right_set ) { xoff = xoff - block.width; } if ( block.bottom_set ) { //joshy: this should really be ... | |
cm.deployTemporaryCoreDestination(dest.isQueue(), dest.getName(), ms, pm); | cm.deployCoreDestination(dest.isQueue(), dest.getName(), ms, pm, 50000, 1000, 1000); | public void addTemporaryDestination(JBossDestination dest) throws JMSException { if (closed) { throw new IllegalStateException("Session is closed"); } if (!dest.isTemporary()) { throw new InvalidDestinationException("Destination:" + dest + " is not a temporary destination")... |
cm.undeployTemporaryCoreDestination(dest.isQueue(), dest.getName()); | cm.undeployCoreDestination(dest.isQueue(), dest.getName()); | public void deleteTemporaryDestination(JBossDestination dest) throws JMSException { if (closed) { throw new IllegalStateException("Session is closed"); } if (!dest.isTemporary()) { throw new InvalidDestinationException("Destination:" + dest + " is not a temporary destinatio... |
handleBeforeCommit(onePhase, refsToAdd, refsToRemove, tx); | if (onePhase) { handleBeforeCommit1PC(refsToAdd, refsToRemove, tx); } else { handleBeforeCommit2PC(refsToRemove, tx); } | public void beforeCommit(boolean onePhase) throws Exception { handleBeforeCommit(onePhase, refsToAdd, refsToRemove, tx); } |
handleBeforeRollback(onePhase, refsToAdd, tx); | if (onePhase) { } else { handleBeforeRollback(refsToAdd, tx); } | public void beforeRollback(boolean onePhase) throws Exception { handleBeforeRollback(onePhase, refsToAdd, tx); } |
Message m = ref.getMessage(); | public void addReference(long channelID, MessageReference ref, Transaction tx) throws Exception { if (tx != null) { //In a tx so we just add the ref in the tx in memory for now TransactionCallback callback = getCallback(tx); callback.addReferenceToAdd(channelID, ref); } ... | |
addReference(channelID, ref, psReference); | addReference(channelID, ref, psReference, true); | public void addReference(long channelID, MessageReference ref, Transaction tx) throws Exception { if (tx != null) { //In a tx so we just add the ref in the tx in memory for now TransactionCallback callback = getCallback(tx); callback.addReferenceToAdd(channelID, ref); } ... |
psMessage = conn.prepareStatement(insertMessage); boolean added = checkStoreMessage(ref, psMessage); if (added) { | synchronized (m) { m.incPersistentChannelCount(); if (m.getPersistentChannelCount() == 1) { psMessage = conn.prepareStatement(insertMessage); storeMessage(m, psMessage); } else { psMessage = conn.prepareStatement(updateMessageChannelCount); updateMessageChannelCount(m, psMessage); } | public void addReference(long channelID, MessageReference ref, Transaction tx) throws Exception { if (tx != null) { //In a tx so we just add the ref in the tx in memory for now TransactionCallback callback = getCallback(tx); callback.addReferenceToAdd(channelID, ref); } ... |
log.trace("Inserted " + rows + " rows"); | log.trace("Inserted/updated " + rows + " rows"); | public void addReference(long channelID, MessageReference ref, Transaction tx) throws Exception { if (tx != null) { //In a tx so we just add the ref in the tx in memory for now TransactionCallback callback = getCallback(tx); callback.addReferenceToAdd(channelID, ref); } ... |
public void addReferences(long channelID, List references) throws Exception | public void addReferences(long channelID, List references, boolean loaded) throws Exception | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
PreparedStatement psReference = null; PreparedStatement psMessage = null; | PreparedStatement psInsertReference = null; PreparedStatement psInsertMessage = null; PreparedStatement psUpdateMessage = null; | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
boolean messagesInBatch = false; | boolean messageInsertsInBatch = false; boolean messageUpdatesInBatch = false; | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
psReference = conn.prepareStatement(insertMessageRef); psMessage = conn.prepareStatement(insertMessage); } | psInsertReference = conn.prepareStatement(insertMessageRef); psInsertMessage = conn.prepareStatement(insertMessage); psUpdateMessage = conn.prepareStatement(updateMessageChannelCount); } | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
Message m = ref.getMessage(); | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... | |
psReference = conn.prepareStatement(insertMessageRef); } | psInsertReference = conn.prepareStatement(insertMessageRef); } | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
addReference(channelID, ref, psReference); | addReference(channelID, ref, psInsertReference, loaded); | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
psReference.addBatch(); | psInsertReference.addBatch(); | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
int rows = psReference.executeUpdate(); | int rows = psInsertReference.executeUpdate(); | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
psReference.close(); psReference = null; } | psInsertReference.close(); psInsertReference = null; } | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
psMessage = conn.prepareStatement(insertMessage); } boolean added = checkStoreMessage(ref, psMessage); if (usingBatchUpdates) { if (added) { psMessage.addBatch(); messagesInBatch = true; } } else { if (added) { int rows = psMessage.executeUpdate(); if (trace) { log.trace("Inserted " + rows + " rows"); } } psMessage... | psInsertMessage = conn.prepareStatement(insertMessage); psUpdateMessage = conn.prepareStatement(updateMessageChannelCount); } synchronized (m) { m.incPersistentChannelCount(); boolean added; if (m.getPersistentChannelCount() == 1) { storeMessage(m, psInsertMessage); added = true; } else { updateMessageChannelCou... | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
int[] rowsReference = psReference.executeBatch(); | int[] rowsReference = psInsertReference.executeBatch(); | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
if (messagesInBatch) { int[] rowsMessage = psMessage.executeBatch(); | if (messageInsertsInBatch) { int[] rowsMessage = psInsertMessage.executeBatch(); | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
psReference.close(); psReference = null; psMessage.close(); psMessage = null; | if (messageUpdatesInBatch) { int[] rowsMessage = psUpdateMessage.executeBatch(); if (trace) { logBatchUpdate(updateMessageChannelCount, rowsMessage, "updated"); } } psInsertReference.close(); psInsertReference = null; psInsertMessage.close(); psInsertMessage = null; psUpdateMessage.close(); psUpdateMessage = null; | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
if (psReference != null) { try { psReference.close(); } catch (Throwable t) { } } if (psMessage != null) { try { psMessage.close(); | if (psInsertReference != null) { try { psInsertReference.close(); } catch (Throwable t) { } } if (psInsertMessage != null) { try { psInsertMessage.close(); } catch (Throwable t) { } } if (psUpdateMessage != null) { try { psUpdateMessage.close(); | public void addReferences(long channelID, List references) throws Exception { Connection conn = null; PreparedStatement psReference = null; PreparedStatement psMessage = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); Iterator... |
log.info("creating tables"); | protected void createSchema() throws Exception { Connection conn = null; TransactionWrapper tx = new TransactionWrapper(); try { conn = ds.getConnection(); try { conn.createStatement().executeUpdate(createTransaction); if (trace) { ... | |
int persistentChannelCount = rs.getInt(8); | public List getMessages(List messageIds) throws Exception { if (trace) { log.trace("Getting batch of messages for " + messageIds); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); try ... | |
byte type = rs.getByte(8); | byte type = rs.getByte(9); | public List getMessages(List messageIds) throws Exception { if (trace) { log.trace("Getting batch of messages for " + messageIds); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); try ... |
String jmsType = rs.getString(9); String correlationID = rs.getString(10); byte[] correlationIDBytes = rs.getBytes(11); long destinationId = rs.getLong(12); long replyToId = rs.getLong(13); | String jmsType = rs.getString(10); String correlationID = rs.getString(11); byte[] correlationIDBytes = rs.getBytes(12); long destinationId = rs.getLong(13); long replyToId = rs.getLong(14); | public List getMessages(List messageIds) throws Exception { if (trace) { log.trace("Getting batch of messages for " + messageIds); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); try ... |
bytes = getLongVarBinary(rs, 14); | bytes = getLongVarBinary(rs, 15); | public List getMessages(List messageIds) throws Exception { if (trace) { log.trace("Getting batch of messages for " + messageIds); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); try ... |
coreHeaders, payload, type, jmsType, correlationID, correlationIDBytes, dest, replyTo, | coreHeaders, payload, persistentChannelCount, type, jmsType, correlationID, correlationIDBytes, dest, replyTo, | public List getMessages(List messageIds) throws Exception { if (trace) { log.trace("Getting batch of messages for " + messageIds); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); try ... |
coreHeaders, payload); | coreHeaders, payload, persistentChannelCount); | public List getMessages(List messageIds) throws Exception { if (trace) { log.trace("Getting batch of messages for " + messageIds); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); try ... |
PreparedStatement psMessage = null; | PreparedStatement psInsertMessage = null; PreparedStatement psUpdateMessage = null; | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psMessage = null; Co... |
boolean messagesInBatch = false; | boolean messageInsertsInBatch = false; boolean messageUpdatesInBatch = false; | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psMessage = null; Co... |
psMessage = conn.prepareStatement(insertMessage); } | psInsertMessage = conn.prepareStatement(insertMessage); psUpdateMessage = conn.prepareStatement(updateMessageChannelCount); } | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psMessage = null; Co... |
psMessage = conn.prepareStatement(insertMessage); } boolean added = checkStoreMessage(pair.ref, psMessage); if (batch) { if (added) { psMessage.addBatch(); messagesInBatch = true; } } else { if (added) { int rows = psMessage.executeUpdate(); if (trace) { log.trace("Inserted " + rows + " rows"); } } psMessage.close(... | psInsertMessage = conn.prepareStatement(insertMessage); psUpdateMessage = conn.prepareStatement(updateMessageChannelCount); } Message m = pair.ref.getMessage(); synchronized (m) { m.incPersistentChannelCount(); boolean added; if (m.getPersistentChannelCount() == 1) { storeMessage(m, psInsertMessage); added = true;... | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psMessage = null; Co... |
if (messagesInBatch) { int[] rowsMessage = psMessage.executeBatch(); | if (messageInsertsInBatch) { int[] rowsMessage = psInsertMessage.executeBatch(); | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psMessage = null; Co... |
if (messageUpdatesInBatch) { int[] rowsMessage = psUpdateMessage.executeBatch(); if (trace) { logBatchUpdate(updateMessageChannelCount, rowsMessage, "updated"); } } | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psMessage = null; Co... | |
psMessage.close(); psMessage = null; } | psInsertMessage.close(); psInsertMessage = null; psUpdateMessage.close(); psUpdateMessage = null; } | protected void handleBeforePrepare(List refsToAdd, List refsToRemove, Transaction tx) throws Exception { //We insert a tx record and //a row for each ref with + //and update the row for each delivery with "-" PreparedStatement psReference = null; PreparedStatement psMessage = null; Co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.