InitialContext ic = new InitialContext(); ds = (DataSource)ic.lookup(dataSourceJNDIName); ic.close();
   protected void startService() throws Exception   {      // these are supposed to be set by dependencies, this is just a safeguard      if (ds == null)      {         throw new Exception("No DataSource found. This service dependencies must  " +                             "have not been enforced correctly!");      }      if (tm == null)      {         throw new Exception("No TransactionManager found. This service dependencies must " +                             "have not been enforced correctly!");      }      initSqlProperties();      if (createTablesOnStartup)      {         createSchema();      }      if (performRecovery)      {         resolveAllUncommitedTXs();      }      log.debug(this + " started");   }