Exemplo n.º 1
0
 public void setKilled(boolean b) {
   if (myAccess.getCompiledScript().getCurrentMap() != null) {
     Mappable myMap = (Mappable) myAccess.getCompiledScript().getCurrentMap().myObject;
     if (myMap != null && myMap instanceof com.dexels.navajo.adapter.SQLMap) {
       ((SQLMap) myMap).setKillConnection();
     }
   }
   myAccess.getCompiledScript().setKill(b);
 }
Exemplo n.º 2
0
  private void showMapDetails(Message parent, MappableTreeNode m)
      throws NavajoException, MappingException, UserException {

    Mappable myMap = (Mappable) m.myObject;

    addProperty(parent, "Map", m.getMapName(), Property.STRING_PROPERTY, 50);
    addProperty(parent, "Totaltime", new Integer(m.getTotaltime()), Property.STRING_PROPERTY, 50);

    Class<?> ccc = null;
    try {
      ccc = Class.forName("com.dexels.navajo.adapter.SPMap");
    } catch (ClassNotFoundException e) {
    }
    if (myMap instanceof com.dexels.navajo.adapter.SQLMap
        || (ccc != null && (ccc.isInstance(myMap)))) {
      SQLMap mySQL = (SQLMap) myMap;
      Message parameters = getMessage(parent, "MapParameters");
      addProperty(parameters, "Datasource", mySQL.getDatasource(), Property.STRING_PROPERTY, 50);
      addProperty(
          parameters,
          "DatabaseProductName",
          mySQL.getDatabaseProductName(),
          Property.STRING_PROPERTY,
          100);
      addProperty(
          parameters, "DatabaseVersion", mySQL.getDatabaseVersion(), Property.STRING_PROPERTY, 100);
      addProperty(
          parameters, "SessionId", mySQL.getDatabaseSessionId(), Property.STRING_PROPERTY, -1);
      addProperty(parameters, "Query", mySQL.getQuery(), Property.STRING_PROPERTY, -1);
    }

    // Show parents.
    if (m.getParent() != null) {
      Message parentMap = getMessage(parent, "ParentMap");
      showMapDetails(parentMap, m.getParent());
    }
  }