private void initConnection() throws CoreTokenException {
  if (connection == null || !factory.isValid(connection)) {
    try {
      connection=factory.create();
      query.setConnection(connection);
    }
 catch (    DataLayerException e) {
      throw new CoreTokenException("Failed to init connection to data layer",e);
    }
  }
}

private void initConnection ( ) throws CoreTokenException { if ( connection == null || ! factory . isValid ( connection ) ) { try { connection = factory . create ( ) ; query . setConnection ( connection ) ; } catch ( DataLayerException e ) { throw new CoreTokenException ( "Failed to init connection to data layer" , e ) ; } } }
if this is the first call , then initialise the connection .
