return new Connection(conn);
int numActive = sConnectionPool.getNumActive(); int maxActive = sConnectionPool.getMaxActive(); if (numActive > maxActive * 0.75) { String stackTraceMsg = "Turn on debug logging for zimbra.sqltrace to see stack " + "traces of connections not returned to the pool."; if (ZimbraLog.sqltrace.isDebugEnabled()) { StringBuffer buf = new StringBuffer(); synchronized (sConnectionStackCounter) { Iterator i = sConnectionStackCounter.iterator(); while (i.hasNext()) { String stackTrace = (String) i.next(); int count = sConnectionStackCounter.getCount(stackTrace); if (count == 0) { i.remove(); } else { buf.append(count + " connections allocated at " + stackTrace + "\n"); } } } stackTraceMsg = buf.toString(); } ZimbraLog.sqltrace.warn("Connection pool is 75% utilized.  " + numActive + "connections out of a maximum of " + maxActive + " in use.  "+ stackTraceMsg); }  Connection zimbraConn = new Connection(conn);   if (ZimbraLog.sqltrace.isDebugEnabled()) { Throwable t = new Throwable(); zimbraConn.setStackTrace(t);  synchronized (sConnectionStackCounter) { sConnectionStackCounter.increment(SystemUtil.getStackTrace(t)); } }  return zimbraConn;
    public static Connection getConnection() throws ServiceException {        java.sql.Connection conn = null;        try {	        String url = "jdbc:apache:commons:dbcp:zimbra";	        conn = DriverManager.getConnection(url);	        	        if (conn.getAutoCommit() != false)	            conn.setAutoCommit(false);		        // We want READ COMMITTED transaction isolation level for duplicate	        // handling code in BucketBlobStore.newBlobInfo().	        conn.setTransactionIsolation(java.sql.Connection.TRANSACTION_READ_COMMITTED);        } catch (SQLException e) {        	throw ServiceException.FAILURE("getting database connection", e);        }        return new Connection(conn);    }