if (tm == null) { throw new Exception("No TransactionManager found. This service dependencies must " + "have not been enforced correctly!"); }
   protected void startService() throws Exception   {      if (ds == null)      {         InitialContext ic = new InitialContext();         ds = (DataSource) ic.lookup(dataSourceJNDIName);         ic.close();      }            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!");      }            if (cmObjectName != null)      {         MBeanServer server = getServer();                  cm = (ChannelMapper) server.getAttribute(cmObjectName, "Instance");      }            Connection conn = null;            try      {         conn = ds.getConnection();               //JBossMessaging requires transaction isolation of READ_COMMITTED         //Any looser isolation level and we cannot maintain consistency for paging (HSQL)         if (conn.getTransactionIsolation() != Connection.TRANSACTION_READ_COMMITTED)         {            int level = conn.getTransactionIsolation();            String warn =               "\n\n" +               "Warning! Connection transaction isolation should be READ_COMMITTED, but it is currently " + Util.transactionIsolationToString(level) + ".\n" +               "         Using an isolation level less strict than READ_COMMITTED may lead to data consistency problems.\n" +               "         Using an isolation level more strict than READ_COMMITTED may lead to deadlock.\n";            log.warn(warn);         }      }      finally      {         conn.close();      }                  initSqlProperties();            if (createTablesOnStartup)      {         createSchema();      }            resetMessageData();              log.debug(this + " started");            this.usingBatchUpdates = false;   }