EJBHome home = (EJBHome) PortableRemoteObject.narrow(new InitialContext().lookup(ejbLocation), javax.ejb.EJBHome.class);
EJBLocalHome home = (EJBLocalHome) PortableRemoteObject.narrow(new InitialContext().lookup(ejbLocation), EJBLocalHome.class);
    public Object registerVariable(WorkflowContext context, WorkflowEntry entry, Map args) throws WorkflowException {        String ejbLocation = (String) args.get(AbstractWorkflow.EJB_LOCATION);        Register sessionBean = null;        try {            EJBHome home = (EJBHome) PortableRemoteObject.narrow(new InitialContext().lookup(ejbLocation), javax.ejb.EJBHome.class);            Method create = home.getClass().getMethod("create", new Class[0]);            sessionBean = (Register) create.invoke(home, new Object[0]);        } catch (Exception e) {            String message = "Could not get handle to local EJB register at: " + ejbLocation;            throw new WorkflowException(message, e);        }        return sessionBean.registerVariable(context, entry, args);    }