private void prepareMetadataConnection() throws SQLException, ReplicatorException {
  if (metadataConnection == null)   metadataConnection=dataSourceImpl.getConnection();
  long currentTime=System.currentTimeMillis();
  if (lastConnectionTime == 0) {
    lastConnectionTime=currentTime;
  }
 else   if (reconnectTimeoutInSeconds > 0 && currentTime - lastConnectionTime > reconnectTimeoutInSeconds * 1000) {
    dataSourceImpl.releaseConnection(metadataConnection);
    metadataConnection=dataSourceImpl.getConnection();
  }
}

private void prepareMetadataConnection ( ) throws SQLException , ReplicatorException { if ( metadataConnection == null ) metadataConnection = dataSourceImpl . getConnection ( ) ; long currentTime = System . currentTimeMillis ( ) ; if ( lastConnectionTime == 0 ) { lastConnectionTime = currentTime ; } else if ( reconnectTimeoutInSeconds > 0 && currentTime - lastConnectionTime > reconnectTimeoutInSeconds * 1000 ) { dataSourceImpl . releaseConnection ( metadataConnection ) ; metadataConnection = dataSourceImpl . getConnection ( ) ; } }
prepare the metadata connection for use : connect or reconnect if needed .
