RegisterRemote sessionBean;
    public Object registerVariable(WorkflowContext context, WorkflowEntry entry, Map args) throws WorkflowException {        String ejbLocation = (String) args.get(AbstractWorkflow.EJB_LOCATION);        RegisterRemote sessionBean;        Hashtable env = null;        Iterator iter = args.entrySet().iterator();        while (iter.hasNext()) {            Map.Entry item = (Map.Entry) iter.next();            if (env == null) {                env = new Hashtable();            }            if (((String) item.getKey()).startsWith("java.naming.")) {                env.put(item.getKey(), item.getValue());            }        }        try {            EJBHome home = (EJBHome) PortableRemoteObject.narrow(new InitialContext(env).lookup(ejbLocation), javax.ejb.EJBHome.class);            Method create = home.getClass().getMethod("create", new Class[0]);            sessionBean = (RegisterRemote) create.invoke(home, new Object[0]);        } catch (Exception e) {            String message = "Could not get handle to remote EJB register at: " + ejbLocation;            throw new WorkflowException(message, e);        }        try {            return sessionBean.registerVariable(context, entry, args);        } catch (RemoteException e) {            String message = "Remote exception while executing remote EJB register: " + ejbLocation;            throw new WorkflowException(message, e);        }    }