/** * Fetch multiple repository connections at a single time. * * @param connectionNames are a list of connection names. * @return the corresponding repository connection objects. */ protected RepositoryConnection[] getRepositoryConnectionsMultiple(String[] connectionNames) throws ManifoldCFException { RepositoryConnection[] rval = new RepositoryConnection[connectionNames.length]; HashMap returnIndex = new HashMap(); int i = 0; while (i < connectionNames.length) { rval[i] = null; returnIndex.put(connectionNames[i], new Integer(i)); i++; } beginTransaction(); try { i = 0; ArrayList params = new ArrayList(); int j = 0; int maxIn = maxClauseGetRepositoryConnectionsChunk(); while (i < connectionNames.length) { if (j == maxIn) { getRepositoryConnectionsChunk(rval, returnIndex, params); params.clear(); j = 0; } params.add(connectionNames[i]); i++; j++; } if (j > 0) getRepositoryConnectionsChunk(rval, returnIndex, params); return rval; } catch (Error e) { signalRollback(); throw e; } catch (ManifoldCFException e) { signalRollback(); throw e; } finally { endTransaction(); } }