@Test public void returnsConnection() { ConnectionPool toTest = new ConnectionPool(newFactory()); ObjectContainer container = toTest.acquire(); assertNotNull(container); }
public ObjectContainer acquire() { synchronized (sync){ SessionClientPair containerPair = acquirePooledContainer(); leasedClients.put(containerPair.sessionContainer,containerPair.clientContainer); return containerPair.sessionContainer; } }
ConnectionPool { public ObjectContainer acquire() { synchronized (sync){ SessionClientPair containerPair = acquirePooledContainer(); leasedClients.put(containerPair.sessionContainer,containerPair.clientContainer); return containerPair.sessionContainer; } } }
ConnectionPool { public ObjectContainer acquire() { synchronized (sync){ SessionClientPair containerPair = acquirePooledContainer(); leasedClients.put(containerPair.sessionContainer,containerPair.clientContainer); return containerPair.sessionContainer; } } ConnectionPool(ClientConnectionFactory connectionFactory); }
ConnectionPool { public ObjectContainer acquire() { synchronized (sync){ SessionClientPair containerPair = acquirePooledContainer(); leasedClients.put(containerPair.sessionContainer,containerPair.clientContainer); return containerPair.sessionContainer; } } ConnectionPool(ClientConnectionFactory connectionFactory); ObjectContainer acquire(); void release(ObjectContainer session); void closeAndRelease(ObjectContainer session); }
ConnectionPool { public ObjectContainer acquire() { synchronized (sync){ SessionClientPair containerPair = acquirePooledContainer(); leasedClients.put(containerPair.sessionContainer,containerPair.clientContainer); return containerPair.sessionContainer; } } ConnectionPool(ClientConnectionFactory connectionFactory); ObjectContainer acquire(); void release(ObjectContainer session); void closeAndRelease(ObjectContainer session);  }