/** * {@inheritDoc} */ @Override public PooledObject<T> makeObject() throws Exception { writeLock.lock(); try { return factory.makeObject(); } finally { writeLock.unlock(); } }
/** * {@inheritDoc} */ @Override public PooledObject<T> makeObject() throws Exception { writeLock.lock(); try { return factory.makeObject(); } finally { writeLock.unlock(); } }
p = factory.makeObject(); } catch (final Throwable e) { createCount.decrementAndGet();
"Cannot add objects without a factory."); final T obj = factory.makeObject().getObject(); createCount++;
private static <T> List<String> invokeEveryMethod(final PooledObjectFactory<T> pof) throws Exception { pof.activateObject(null); pof.destroyObject(null); pof.makeObject(); pof.passivateObject(null); pof.validateObject(null); pof.toString(); final List<String> expectedMethods = Arrays.asList(new String[] { "activateObject", "destroyObject", "makeObject", "passivateObject", "validateObject", "toString", }); return expectedMethods; }
obj = factory.makeObject().getObject(); createCount++;
/** * {@inheritDoc} */ @Override public PooledObject<T> makeObject() throws Exception { writeLock.lock(); try { return factory.makeObject(); } finally { writeLock.unlock(); } }
/** * Gets the channel. * * @return the channel */ public Connection getChannel() { Connection channel = null; try { if (!clientConfig.isShortConnection()) { channel = pool.borrowObject(); } else { channel = objectFactory.makeObject().getObject(); } } catch (Exception e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); throw new RuntimeException(e.getMessage(), e); } return channel; }
p = factory.makeObject(); } catch (final Throwable e) { createCount.decrementAndGet();
"Cannot add objects without a factory."); final T obj = factory.makeObject().getObject(); createCount++;
obj = factory.makeObject().getObject(); createCount++;