*/
public static SOSConnection getJobConnection(SOSConnection connection, String spoolerId, String jobName, SOSLogger log) throws Exception{
SOSConnection localConnection;
String connectionName = "";
HashMap result = null;
if (log==null) log=new SOSStandardLogger(SOSLogger.INFO);
if (connectionName == null || connectionName.length() == 0) {
connectionName = connection.getSingleValue("SELECT \"CONNECTION\" FROM " + getTableManagedJobs() +
" WHERE \"SPOOLER_ID\"='" + spoolerId + "' AND \"JOB_NAME\"='" + jobName + "'");
}