protected void writeConnections(final OJSONWriter json, final String databaseName) throws IOException {
json.beginCollection(1, true, "connections");
final List<OClientConnection> conns = OClientConnectionManager.instance().getConnections();
for (OClientConnection c : conns) {
final ONetworkProtocolData data = c.data;
if (databaseName != null && !databaseName.equals((data.lastDatabase)))
// SKIP IT
continue;