| Chunk |
|---|
| Conflicting content |
|---|
log.warn("resource '" + bean.getUniqueName() + "' is configured to ignore recovery failures, make sure this setting is not enabled on a production system!");
}
<<<<<<< HEAD
/**
* Get the XAFactory (XADataSource) that produces objects for this pool.
*
* @return the factory (XADataSource) object
*/
=======
private synchronized void init() throws Exception {
growUntilMinPoolSize();
if (bean.getMaxIdleTime() > 0) {
TransactionManagerServices.getTaskScheduler().schedulePoolShrinking(this);
}
}
>>>>>>> 2a77569be22e6727581aa5c827bf85a6d552be5b
public Object getXAFactory() {
return xaFactory;
} |
| Solution content |
|---|
log.warn("resource '" + bean.getUniqueName() + "' is configured to ignore recovery failures, make sure this setting is not enabled on a production system!");
}
/**
* Get the XAFactory (XADataSource) that produces objects for this pool.
*
* @return the factory (XADataSource) object
*/
public Object getXAFactory() {
return xaFactory;
} |
| File |
|---|
| XAPool.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
} catch (Exception ex2) {
if (log.isDebugEnabled()) { log.debug("exception while trying to close invalid connection, ignoring it", ex2); }
}
<<<<<<< HEAD
finally {
if (xaStatefulHolder.getState() != XAStatefulHolder.STATE_CLOSED) {
stateChanged(xaStatefulHolder, xaStatefulHolder.getState(), XAStatefulHolder.STATE_CLOSED);
}
if (log.isDebugEnabled()) { log.debug("removed invalid connection " + xaStatefulHolder + " from " + this); }
=======
objects.remove(xaStatefulHolder);
if (log.isDebugEnabled()) log.debug("removed invalid connection " + xaStatefulHolder + " from " + this);
if (log.isDebugEnabled()) log.debug("waiting " + bean.getAcquisitionInterval() + "s before trying to acquire a connection again from " + this);
long waitTime = bean.getAcquisitionInterval() * 1000L;
if (waitTime > 0) {
try {
wait(waitTime);
} catch (InterruptedException ex2) {
// ignore
}
>>>>>>> 2a77569be22e6727581aa5c827bf85a6d552be5b
}
// check for timeout |
| Solution content |
|---|
} catch (Exception ex2) {
if (log.isDebugEnabled()) { log.debug("exception while trying to close invalid connection, ignoring it", ex2); }
}
finally {
if (xaStatefulHolder.getState() != XAStatefulHolder.STATE_CLOSED) {
stateChanged(xaStatefulHolder, xaStatefulHolder.getState(), XAStatefulHolder.STATE_CLOSED);
}
if (log.isDebugEnabled()) { log.debug("removed invalid connection " + xaStatefulHolder + " from " + this); }
if (log.isDebugEnabled()) log.debug("waiting " + bean.getAcquisitionInterval() + "s before trying to acquire a connection again from " + this);
long waitTime = bean.getAcquisitionInterval() * 1000L;
if (waitTime > 0) {
try {
wait(waitTime);
} catch (InterruptedException ex2) {
// ignore
}
}
}
// check for timeout |
| File |
|---|
| XAPool.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Try statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
for (int i=0; i < increment ;i++) {
createPooledObject(xaFactory);
}
<<<<<<< HEAD
}
else {
if (log.isDebugEnabled()) { log.debug("pool " + bean.getUniqueName() + " already at max size of " + totalPoolSize() + " connection(s), not growing it"); }
}
}
=======
} else {
if (log.isDebugEnabled()) log.debug("pool " + bean.getUniqueName() + " already at max size of " + totalPoolSize() + " connection(s), not growing it");
}
}
private synchronized void growUntilMinPoolSize() throws Exception {
for (int i = (int)totalPoolSize(); i < bean.getMinPoolSize() ;i++) {
createPooledObject(xaFactory);
}
}
private synchronized void waitForConnectionInPool() {
long remainingTime = bean.getAcquisitionTimeout() * 1000L;
if (log.isDebugEnabled()) log.debug("waiting for IN_POOL connections count to be > 0, currently is " + inPoolSize());
while (inPoolSize() == 0) {
long before = MonotonicClock.currentTimeMillis();
try {
if (log.isDebugEnabled()) log.debug("waiting " + remainingTime + "ms");
wait(remainingTime);
if (log.isDebugEnabled()) log.debug("waiting over, IN_POOL connections count is now " + inPoolSize());
} catch (InterruptedException ex) {
// ignore
}
long now = MonotonicClock.currentTimeMillis();
remainingTime -= (now - before);
if (remainingTime <= 0 && inPoolSize() == 0) {
if (log.isDebugEnabled()) log.debug("connection pool dequeue timed out");
if (TransactionManagerServices.isTransactionManagerRunning())
TransactionManagerServices.getTransactionManager().dumpTransactionContexts();
throw new BitronixRuntimeException("XA pool of resource " + bean.getUniqueName() + " still empty after " + bean.getAcquisitionTimeout() + "s wait time");
}
} // while
}
>>>>>>> 2a77569be22e6727581aa5c827bf85a6d552be5b
/**
* Shared Connection Handling
*/ |
| Solution content |
|---|
for (int i=0; i < increment ;i++) {
createPooledObject(xaFactory);
}
}
else {
if (log.isDebugEnabled()) { log.debug("pool " + bean.getUniqueName() + " already at max size of " + totalPoolSize() + " connection(s), not growing it"); }
}
}
private synchronized void growUntilMinPoolSize() throws Exception {
if (log.isDebugEnabled()) { log.debug("growing " + this + " to minimum pool size " + bean.getMinPoolSize()); }
for (int i = (int)totalPoolSize(); i < bean.getMinPoolSize() ;i++) {
createPooledObject(xaFactory);
}
}
private synchronized void waitForConnectionInPool() {
long remainingTime = bean.getAcquisitionTimeout() * 1000L;
if (log.isDebugEnabled()) log.debug("waiting for IN_POOL connections count to be > 0, currently is " + inPoolSize());
while (inPoolSize() == 0) {
long before = MonotonicClock.currentTimeMillis();
try {
if (log.isDebugEnabled()) log.debug("waiting " + remainingTime + "ms");
wait(remainingTime);
if (log.isDebugEnabled()) log.debug("waiting over, IN_POOL connections count is now " + inPoolSize());
} catch (InterruptedException ex) {
// ignore
}
long now = MonotonicClock.currentTimeMillis();
remainingTime -= (now - before);
if (remainingTime <= 0 && inPoolSize() == 0) {
if (log.isDebugEnabled()) log.debug("connection pool dequeue timed out");
if (TransactionManagerServices.isTransactionManagerRunning())
TransactionManagerServices.getTransactionManager().dumpTransactionContexts();
throw new BitronixRuntimeException("XA pool of resource " + bean.getUniqueName() + " still empty after " + bean.getAcquisitionTimeout() + "s wait time");
}
} // while
}
/**
* Shared Connection Handling
*/ |
| File |
|---|
| XAPool.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| If statement |
| Method declaration |