TaskReturnJunction homeJunction = new TaskReturnJunction (comAddress, WVMName, myWVM.getPort());
TaskReturnJunction homeJunction = new TaskReturnJunction (comAddress, WVMName, myWVM.getRMIPort(), myWVM.getWVMPort());
  public void dispatchAction (Allocation a, ExecAgentAsset executor) {    Task theTask = a.getTask();    Verb taskVerb = theTask.getVerb();    Asset dirObj = theTask.getDirectObject();    WorkletJunction taskJunction = null;    TaskReturnJunction homeJunction = new TaskReturnJunction (comAddress, WVMName, myWVM.getPort());    homeJunction.setAllocID (a.getUID());    homeJunction.setExecID (executor.getUID());    homeJunction.setClusterID (getClusterIdentifier().toString());    homeJunction.setPluginID (getBlackboardClientName());    Worklet taskWkl = new Worklet(homeJunction);    Class juncClass = null;    String juncClassName = executor.getExecutorPG().getJunction();    try {	juncClass = Class.forName(juncClassName);    } catch (ClassNotFoundException e) {	try {		juncClass = remoteClassDownload (executor, juncClassName);	} catch (ClassNotFoundException e1) {		failTask (theTask);		System.out.println (e1);		e1.printStackTrace();	}      }    int i;    Constructor theConstructor = null;    try {	Class[] constructorParams = {Class.forName("java.lang.String"), Class.forName("java.lang.String"), int.class};	theConstructor = juncClass.getConstructor (constructorParams);    } catch (NoSuchMethodException e1) {	failTask (theTask);	e1.printStackTrace();    }    catch (ClassNotFoundException e2) {	failTask (theTask);	e2.printStackTrace();    }    //target host setting    WVMPG targetWVM = allocJunction.getTargetWVM(a);    Object[] params= {targetWVM.getAddress(), targetWVM.getId(), new Integer(targetWVM.getSocketPort())};    try {	taskJunction = (WorkletJunction) theConstructor.newInstance(params);    } catch (Exception e) { // could not instantiate the junction	System.err.println ("Task operation cannot be accomplished - failing task " + theTask);	failTask (theTask);	e.printStackTrace();    }    System.out.println ("***** " + taskJunction.getClass().getName() + " ******");    if (taskJunction  instanceof TaskJunction) {	((TaskJunction)taskJunction).setRetHandle(homeJunction);	((TaskJunction)taskJunction).setTaskVerb(theTask.getVerb().toString());        // task data loading now        allocJunction.loadTaskData((TaskJunction)taskJunction, a);	((TaskJunction)taskJunction).setMessage(		"executing action for WF task: " + theTask.getVerb().toString());	taskWkl.addJunction (taskJunction);	//notifyAllocation(dirObj);	taskWkl.deployWorklet(myWVM);    }    else	// junction is not a TaskJunction	failTask(theTask);  }