public DBBroker get(User user) throws EXistException { DBBroker broker = get(); broker.setUser(user); return broker;
public DBBroker get() throws EXistException { if (!isInstanceConfigured()) throw new EXistException("database instance is not available"); DBBroker broker = (DBBroker)threads.get(Thread.currentThread()); if(broker != null) {  broker.incReferenceCount(); return broker; } synchronized(this) { if (pool.isEmpty()) { if (brokers < max) createBroker(); else while (pool.isEmpty()) { LOG.debug("waiting for broker instance to become available"); try { this.wait(); } catch (InterruptedException e) { } } } broker = (DBBroker) pool.pop(); threads.put(Thread.currentThread(), broker); broker.incReferenceCount(); this.notifyAll(); return broker; }
	public DBBroker get(User user) throws EXistException {		DBBroker broker = get();		broker.setUser(user);		return broker;	}