if (ds == null) { ds = (DataSource) new javax.naming.InitialContext().lookup(jndi);
if (ds == null) { ds = (DataSource) new javax.naming.InitialContext().lookup(jndi); } } catch (Exception e) { throw new StoreException("Error looking up DataSource at " + jndi, e);
    public void init(Map props) throws StoreException {        entrySequence = (String) props.get("entry.sequence");        stepSequence = (String) props.get("step.sequence");        entryTable = (String) props.get("entry.table");        entryId = (String) props.get("entry.id");        entryName = (String) props.get("entry.name");        entryState = (String) props.get("entry.state");        historyTable = (String) props.get("history.table");        currentTable = (String) props.get("current.table");        currentPrevTable = (String) props.get("currentPrev.table");        historyPrevTable = (String) props.get("historyPrev.table");        stepId = (String) props.get("step.id");        stepEntryId = (String) props.get("step.entryId");        stepStepId = (String) props.get("step.stepId");        stepActionId = (String) props.get("step.actionId");        stepOwner = (String) props.get("step.owner");        stepCaller = (String) props.get("step.caller");        stepStartDate = (String) props.get("step.startDate");        stepFinishDate = (String) props.get("step.finishDate");        stepDueDate = (String) props.get("step.dueDate");        stepStatus = (String) props.get("step.status");        stepPreviousId = (String) props.get("step.previousId");        String jndi = (String) props.get("datasource");        try {            ds = (DataSource) lookup(jndi);            if (ds == null) {                ds = (DataSource) new javax.naming.InitialContext().lookup(jndi);            }        } catch (Exception e) {            throw new StoreException("Error looking up DataSource at " + jndi, e);        }        if (ds == null) {            throw new StoreException("No DataSource found at " + jndi);        }    }