Example usage for java.rmi RemoteException printStackTrace

List of usage examples for java.rmi RemoteException printStackTrace

Introduction

In this page you can find the example usage for java.rmi RemoteException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:de.tudarmstadt.lt.lm.app.StartLM.java

void startRMI() {
    // create own registry, alternative: use 'rmiregistry' command in class output folder
    try {//  w  w w  . ja  v  a2s  .  c o m
        _registry = LocateRegistry.getRegistry(_host, _rmiRegistryPort);
        _registry.lookup(_name);
    } catch (RemoteException e) {
        try {
            _registry = LocateRegistry.createRegistry(_rmiRegistryPort);
            LOG.info("Publishing RMI.");
        } catch (RemoteException e1) {
            e1.printStackTrace();
            exit();
        }
        _app_serves_rmi_registry = true;
    } catch (NotBoundException e) {
        // That's what we want
    }
    LOG.info("Connected to RMI.");
}

From source file:is.idega.idegaweb.egov.gumbo.bpm.violation.ViolationDataProviderRealWebservice.java

private PersonData getCompany(String personalId, boolean combineAddressAndPostal) {
    if (StringUtil.isEmpty(personalId)) {
        return null;
    }//w w  w .  j a  v a 2 s.  c o  m

    if (SocialSecurityNumber.isCompanySocialSecurityNumber(personalId, LocaleUtil.getIcelandicLocale())) {
        CompanyBusiness companyBusiness = null;
        try {
            companyBusiness = getCompanyBusiness();
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        if (companyBusiness == null) {
            return null;
        }

        String useWS = IWMainApplication.getDefaultIWApplicationContext().getApplicationSettings()
                .getProperty(USE_WEBSERVICE_FOR_COMPANY_LOOKUP, "false");

        Company company = null;

        if (!"false".equals(useWS)) {
            try {
                company = companyBusiness.getCompany(personalId);
            } catch (RemoteException e) {
                e.printStackTrace();
            } catch (FinderException e) {
                company = null;
            }

            if (company == null) {
                CompanyHolder holder = getSkyrrClient().getCompany(personalId);
                if (holder != null) {
                    try {
                        getCompanyRegisterBusiness().updateEntry(holder.getPersonalID(), null,
                                holder.getPostalCode(), null, null, holder.getName(), holder.getAddress(), null,
                                "", null, holder.getVatNumber(), holder.getAddress(), "", null, null, null,
                                null, null, "", null);
                    } catch (RemoteException e) {
                        e.printStackTrace();
                    }
                }
            }
        }

        try {
            if (company == null) {
                company = companyBusiness.getCompany(personalId);
            }
            Address address = company.getAddress();

            PersonData data = new PersonData(company.getPersonalID());
            data.setName(company.getName());
            if (address != null) {
                if (combineAddressAndPostal) {
                    data.setAddress(address.getStreetAddress() + ", " + address.getPostalAddress());
                } else {
                    data.setAddress(address.getStreetAddress());
                    data.setPostalCode(address.getPostalAddress());
                }
            }

            return data;
        } catch (FinderException fe) {
            fe.printStackTrace();
        } catch (RemoteException re) {
            re.printStackTrace();
        }
    }

    PersonData data = new PersonData(personalId);
    data.setName(getLocalizedString("no_company_found", "No company found with personal ID"));
    data.setAddress("");
    data.setPostalCode("");

    return data;
}

From source file:is.idega.idegaweb.egov.cases.presentation.CasesProcessor.java

private void multiProcess(IWContext iwc) {
    String[] cases = iwc.getParameterValues(PARAMETER_CASE_PK);
    if (cases != null) {
        for (int i = 0; i < cases.length; i++) {
            try {
                GeneralCase theCase = getCasesBusiness(iwc).getGeneralCase(new Integer(cases[i]));
                CaseCategory category = theCase.getCaseCategory();
                CaseType type = theCase.getCaseType();
                String status = iwc.getParameter(PARAMETER_STATUS);
                String reply = iwc.getParameter(PARAMETER_REPLY);

                getCasesBusiness(iwc).handleCase(theCase, category, type, status, iwc.getCurrentUser(), reply,
                        iwc);/* ww  w .j a  va  2s .c  o m*/
            } catch (RemoteException e) {
                throw new IBORuntimeException(e);
            } catch (FinderException e) {
                e.printStackTrace();
            }
        }
    }
}

From source file:is.idega.idegaweb.egov.gumbo.bpm.violation.ViolationDataProviderRealWebservice.java

private PersonData getUser(String personalId, boolean combineAddressAndPostal) {
    if (StringUtil.isEmpty(personalId)) {
        return null;
    }// www . j ava  2  s. c  o m

    if (SocialSecurityNumber.isIndividualSocialSecurityNumber(personalId, LocaleUtil.getIcelandicLocale())) {
        UserBusiness userBusiness = null;
        try {
            userBusiness = getUserBusiness();
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        if (userBusiness == null) {
            return null;
        }

        String useWS = IWMainApplication.getDefaultIWApplicationContext().getApplicationSettings()
                .getProperty(USE_WEBSERVICE_FOR_COMPANY_LOOKUP, "false");

        User user = null;

        if (!"false".equals(useWS)) {
            try {
                user = userBusiness.getUser(personalId);
            } catch (RemoteException e) {
                e.printStackTrace();
            } catch (FinderException e) {
                user = null;
            }

            if (user == null) {
                UserHolder holder = getSkyrrClient().getUser(personalId);
                if (holder != null) {
                    IWTimestamp t = new IWTimestamp();

                    String day = holder.getPersonalID().substring(0, 2);
                    String month = holder.getPersonalID().substring(2, 4);
                    String year = holder.getPersonalID().substring(4, 6);

                    int iDay = Integer.parseInt(day);
                    int iMonth = Integer.parseInt(month);
                    int iYear = Integer.parseInt(year);
                    if (holder.getPersonalID().substring(9).equals("9")) {
                        iYear += 1900;
                    } else if (holder.getPersonalID().substring(9).equals("0")) {
                        iYear += 2000;
                    } else if (holder.getPersonalID().substring(9).equals("8")) {
                        iYear += 1800;
                    }
                    t.setHour(0);
                    t.setMinute(0);
                    t.setSecond(0);
                    t.setMilliSecond(0);
                    t.setDay(iDay);
                    t.setMonth(iMonth);
                    t.setYear(iYear);
                    try {
                        user = userBusiness.createUserByPersonalIDIfDoesNotExist(holder.getName(),
                                holder.getPersonalID(), null, t);
                        StringBuilder address = new StringBuilder(holder.getAddress());
                        address.append(";");
                        address.append(holder.getPostalCode());
                        address.append(" ");
                        address.append(";Iceland:is_IS;N/A");
                        userBusiness.updateUsersMainAddressByFullAddressString(user, address.toString());
                    } catch (RemoteException e) {
                        e.printStackTrace();
                    } catch (CreateException e) {
                        e.printStackTrace();
                    }
                }
            }
        }

        try {
            if (user == null) {
                user = userBusiness.getUser(personalId);
            }

            Address address = userBusiness.getUsersMainAddress(user);

            PersonData data = new PersonData(user.getPersonalID());
            data.setName(user.getName());
            if (address != null) {
                if (combineAddressAndPostal) {
                    data.setAddress(address.getStreetAddress() + ", " + address.getPostalAddress());
                } else {
                    data.setAddress(address.getStreetAddress());
                    data.setPostalCode(address.getPostalAddress());
                }
            }

            return data;
        } catch (FinderException fe) {
            fe.printStackTrace();
        } catch (RemoteException re) {
            re.printStackTrace();
        }
    }

    PersonData data = new PersonData(personalId);
    data.setName(getLocalizedString("no_user_found", "No user found with personal ID..."));
    data.setAddress("");
    data.setPostalCode("");

    return data;
}

From source file:com.idega.block.form.presentation.FormViewer.java

private void addResources(IWContext iwc) {
    String defaultStyleSheet = new StringBuilder().append(CoreConstants.WEBDAV_SERVLET_URI)
            .append(IWBundleStarter.SLIDE_STYLES_PATH).append(IWBundleStarter.CHIBA_CSS).toString();

    List<String> scriptsUris = new ArrayList<String>();

    boolean addTestScript = false;

    IWBundle chibaBundle = iwc.getIWMainApplication().getBundle(IWBundleStarter.BUNDLE_IDENTIFIER);
    try {/*from w w  w.  java2 s  .c  o  m*/
        // scripts for XForms - DO NOT change order of scripts!
        scriptsUris.add(jQuery.getBundleURIToJQueryLib());
        scriptsUris.add(jQuery.getBundleURIToJQueryPlugin(JQueryPlugin.MASKED_INPUT));
        scriptsUris.add(jQuery.getBundleURIToJQueryPlugin(JQueryPlugin.URL_PARSER));

        scriptsUris.add(web2.getBundleURIToPrototypeLib());
        scriptsUris
                .add(web2.getBundleURIToScriptaculousLib() + "?load=builder,effects,dragdrop,controls,slider");

        scriptsUris.add(CoreConstants.DWR_ENGINE_SCRIPT);
        scriptsUris.add("/dwr/interface/Flux.js");
        scriptsUris.add(CoreConstants.DWR_UTIL_SCRIPT);

        scriptsUris.add(chibaBundle.getVirtualPathWithFileNameString("javascript/xformsConfig.js"));
        scriptsUris.add(chibaBundle.getVirtualPathWithFileNameString("javascript/dojo-0.4.4/dojo.js"));
        scriptsUris.add(chibaBundle.getVirtualPathWithFileNameString("javascript/xforms-util.js"));
        scriptsUris.add(chibaBundle.getVirtualPathWithFileNameString("javascript/FluxInterface.js"));
        scriptsUris.add(chibaBundle.getVirtualPathWithFileNameString("javascript/PresentationContext.js"));
        scriptsUris.add(chibaBundle.getVirtualPathWithFileNameString("javascript/htmltext.js"));
        scriptsUris.add(chibaBundle.getVirtualPathWithFileNameString("javascript/fckeditor/fckeditor.js"));

        scriptsUris.add(web2.getBundleUriToHumanizedMessagesScript());
        scriptsUris.add(jQuery.getBundleURIToJQueryPlugin(JQueryPlugin.TEXT_AREA_AUTO_GROW));

        //   TinyMCE
        scriptsUris.addAll(web2.getScriptsForTinyMCE());

        //   Test script
        IWMainApplicationSettings settings = iwc.getApplicationSettings();
        if (settings.getBoolean("load_xforms_test_script", Boolean.FALSE))
            scriptsUris.add(chibaBundle.getVirtualPathWithFileNameString("javascript/XFormsTester.js"));

        // Fancybox
        scriptsUris.addAll(web2.getBundleURIsToFancyBoxScriptFiles());

        //   Firefox Lite for IE
        if (settings.getBoolean("load_firebug_ie", Boolean.FALSE) && iwc.isIE())
            scriptsUris.add("https://getfirebug.com/firebug-lite.js");

        String javascript = iwc.getIWMainApplication().getSettings().getProperty("xforms_js",
                CoreConstants.EMPTY);
        String[] jsFiles = javascript.split(CoreConstants.COMMA);
        for (String jsFile : jsFiles) {
            scriptsUris.add(jsFile);
        }

        PresentationUtil.addJavaScriptSourcesLinesToHeader(iwc, scriptsUris);

        if (isPdfViewer()) {
            PresentationUtil.addStyleSheetToHeader(iwc, defaultStyleSheet);
        } else {
            //            CSS
            String css = iwc.getIWMainApplication().getSettings().getProperty("xforms_css", defaultStyleSheet);
            String[] cssFiles = null;
            cssFiles = css.split(CoreConstants.COMMA);

            PresentationUtil.addStyleSheetsToHeader(iwc, Arrays.asList(
                    web2.getBundleUriToHumanizedMessagesStyleSheet(), web2.getBundleURIToFancyBoxStyleFile()));
            for (String cssFile : cssFiles) {
                PresentationUtil.addStyleSheetToHeader(iwc, cssFile);
            }
        }
    } catch (RemoteException e) {
        e.printStackTrace();
    }

    String locale = iwc.getCurrentLocale().toString();
    IWResourceBundle iwrb = chibaBundle.getResourceBundle(iwc);
    String initScript = null;
    try {
        initScript = new StringBuilder("XFormsConfig.setConfiguration({").append("baseScriptUri: '")
                .append(chibaBundle.getVirtualPathWithFileNameString("javascript/dojo-0.4.4/', "))
                .append("locale: '").append(locale).append("', ").append("displayFullForm: '")
                .append(doDisplayFullForm(iwc.getIWMainApplication())).append("', ")
                .append("maxStringValueLength: ").append(XFormsUtil.getBPMStringVariableMaxLength())
                .append("}); ").append("XFormsConfig.locale = '").append(locale).append("'; ")
                .append("Localization.CONFIRM_TO_SAVE_FORM = '")
                .append(iwrb.getLocalizedString("save_form_before_exit", "Save form before exit?"))
                .append("'; ").append("Localization.CONFIRM_TO_LEAVE_NOT_SUBMITTED_FORM = '")
                .append(iwrb.getLocalizedString("confirm_to_leave_unfinished_xform",
                        "Are you sure you want to navigate from unfinished form?"))
                .append("'; Localization.CONFIRM_TO_LEAVE_WHILE_UPLOAD_IN_PROGRESS = '")
                .append(iwrb.getLocalizedString("confirm_to_leave_xform_while_upload_in_progress",
                        "Are you sure you want to navigate from this page while upload is in progress?"))
                .append("';").append("FluxInterfaceHelper.SUBMITTED = ").append(isSubmitted()).append(";")
                .toString();
    } catch (Exception e) {
        e.printStackTrace();
    }
    if (initScript != null)
        PresentationUtil.addJavaScriptActionToBody(iwc, initScript);

    if (addTestScript) {
        int openedSessions = 0;
        if (iwc.isLoggedOn()) {
            String httpSessionId = iwc.getSessionId();
            openedSessions = ChibaUtils.getInstance().getNumberOfXFormSessionsForHttpSession(httpSessionId) + 1;
        } else {
            openedSessions = IdegaXFormSessionManagerImpl.getXFormsSessionManager().getSessionCount() + 1;
        }
        String amount = iwc.getApplicationSettings().getProperty("open_test_sessions", String.valueOf(10));
        String action = "jQuery(window).load(function() {XFormsTester.OPENED_SESSIONS = " + openedSessions
                + "; XFormsTester.openSessions(" + amount + ");});";
        PresentationUtil.addJavaScriptActionToBody(iwc, action);
    }
}

From source file:course.PrivateCloudController.java

public boolean UpdateVMsDB() {
    List<Document> posts = new ArrayList<Document>();// = statsDAO.findByDateDescending(10);
    ManagedEntity[] mes = new ManagedEntity[0];
    try {//from  www .j  a  va2  s  . com
        mes = new InventoryNavigator(Path).searchManagedEntities("VirtualMachine");
    } catch (RemoteException e) {
        e.printStackTrace();
    }

    SimpleHash root = new SimpleHash();
    System.out.println("Display VMs : VM list");
    BasicDBObject query = new BasicDBObject();
    VMsDBCollection.deleteMany(query);

    //HashMap<String, String> root = new HashMap<String, String>();
    if (!(mes == null || mes.length == 0)) {
        for (int i = 0; i < mes.length; i++) {
            VirtualMachine vm = (VirtualMachine) mes[i];

            if (!vm.getName().contains("Template")) {
                String name = vm.getName();
                Document DB_VMs = new Document("_id", name);

                if (vm.getConfig() != null) {
                    String instanceId = vm.getConfig().getInstanceUuid();
                }

                System.out.println("VM Name : " + name);

                String conectionState = vm.getRuntime().getConnectionState().toString();
                DB_VMs.append("conectionState", conectionState);

                String ip = vm.getGuest().getIpAddress();
                DB_VMs.append("ip", ip);

                String powerState = vm.getRuntime().getPowerState().toString();

                if (vm.getTriggeredAlarmState() == null) {
                    DB_VMs.append("powerState", "notTriggered");
                } else {
                    DB_VMs.append("powerState", "Triggered");
                }

                String launchTime = writeActualDate(vm.getRuntime().getBootTime());
                DB_VMs.append("launchTime", launchTime);

                VMsDBCollection.insertOne(DB_VMs);

            }
        }
    }
    return true;
}

From source file:de.clusteval.serverclient.BackendClient.java

/**
 * This method will tell the server to shutdown the framework immediately (0
 * timeout)./*from ww w . j a v  a2s. c  o  m*/
 */
public void shutdownFramework() {
    try {
        this.server.shutdown(this.clientId, 0);
    } catch (RemoteException e) {
        e.printStackTrace();
    }
}

From source file:condorclient.MainFXMLController.java

@FXML
public void removedWithoutClosingPoolFired(ActionEvent event) {//?close pool
    int delNo = 0;
    int delsum = 0;
    int n = JOptionPane.showConfirmDialog(null, "??", "",
            JOptionPane.YES_NO_OPTION);
    if (n == JOptionPane.YES_OPTION) {

        //checkboxclusterId
        System.out.print(Thread.currentThread().getName() + "\n");

        URL url = null;//from  w w  w. j  a v a  2 s.c o  m
        XMLHandler handler = new XMLHandler();
        String scheddStr = handler.getURL("schedd");
        try {

            url = new URL(scheddStr);
            //url = new URL("http://localhost:9628");
        } catch (MalformedURLException e3) {
            // TODO Auto-generated catch block
            e3.printStackTrace();
        }
        Schedd schedd = null;

        try {
            schedd = new Schedd(url);
        } catch (ServiceException ex) {
            Logger.getLogger(CondorClient.class.getName()).log(Level.SEVERE, null, ex);
        }

        //ClassAdStructAttr[]
        ClassAd ad = null;//birdbath.ClassAd;
        ClassAdStructAttr[][] classAdArray = null;

        int cluster = 0;

        int job = 0;
        Transaction xact = schedd.createTransaction();
        try {
            xact.begin(30);

        } catch (RemoteException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }
        //  System.out.println("delClusterIds:" + delClusterIds.toString());

        //s
        int removeId = 0;
        final List<?> selectedNodeList = new ArrayList<>(table.getSelectionModel().getSelectedItems());
        for (Object o : selectedNodeList) {
            if (o instanceof ObservableDisplayedClassAd) {
                removeId = Integer.parseInt(((ObservableDisplayedClassAd) o).getClusterId());
            }
        }
        //e

        String findreq = "owner==\"" + condoruser + "\"&&ClusterId==" + removeId;
        try {
            classAdArray = schedd.getJobAds(findreq);
        } catch (RemoteException ex) {
            Logger.getLogger(MainFXMLController.class.getName()).log(Level.SEVERE, null, ex);
        }
        for (ClassAdStructAttr[] x : classAdArray) {
            ad = new ClassAd(x);
            job = Integer.parseInt(ad.get("ProcId"));
            try {
                xact.removeJob(removeId, job, "");

                // System.out.print("ts.getClusterId():" + showClusterId + "\n");
            } catch (RemoteException ex) {
                Logger.getLogger(MainFXMLController.class.getName()).log(Level.SEVERE, null, ex);
            }
        }

        try {
            xact.commit();
        } catch (RemoteException e) {

            e.printStackTrace();
        }

    } else if (n == JOptionPane.NO_OPTION) {
        System.out.println("qu xiao");

    }

}

From source file:condorclient.MainFXMLController.java

@FXML
void pauseButtonFired(ActionEvent event) {
    int delNo = 0;
    int pauseId = 0;
    int n = JOptionPane.showConfirmDialog(null, "??", "",
            JOptionPane.YES_NO_OPTION);
    if (n == JOptionPane.YES_OPTION) {

        //checkboxclusterId
        System.out.print(Thread.currentThread().getName() + "\n");

        URL url = null;//from www  .j a  v  a2s.  com
        XMLHandler handler = new XMLHandler();
        String scheddStr = handler.getURL("schedd");
        try {
            url = new URL(scheddStr);
        } catch (MalformedURLException e3) {
            // TODO Auto-generated catch block
            e3.printStackTrace();
        }
        Schedd schedd = null;

        try {
            schedd = new Schedd(url);
        } catch (ServiceException ex) {
            Logger.getLogger(CondorClient.class.getName()).log(Level.SEVERE, null, ex);
        }

        //ClassAdStructAttr[]
        int boxToClusterId;

        ClassAd ad = null;//birdbath.ClassAd;
        ClassAdStructAttr[][] classAdArray = null;

        Transaction xact = schedd.createTransaction();
        try {
            xact.begin(30);

        } catch (RemoteException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }

        int job = 0;
        //s
        final List<?> selectedNodeList = new ArrayList<>(table.getSelectionModel().getSelectedItems());
        for (Object o : selectedNodeList) {
            if (o instanceof ObservableDisplayedClassAd) {
                pauseId = Integer.parseInt(((ObservableDisplayedClassAd) o).getClusterId());
            }
        }
        //e

        String findreq = "owner==\"" + condoruser + "\"&&ClusterId==" + pauseId;

        try {
            classAdArray = schedd.getJobAds(findreq);
        } catch (RemoteException ex) {
            Logger.getLogger(MainFXMLController.class.getName()).log(Level.SEVERE, null, ex);
        }
        String showJobStatus = null;
        for (ClassAdStructAttr[] x : classAdArray) {
            ad = new ClassAd(x);
            job = Integer.parseInt(ad.get("ProcId"));

            status = Integer.valueOf(ad.get("JobStatus"));
            showJobStatus = statusName[status];
            try {
                if (showJobStatus.equals("") || showJobStatus.equals("?")
                        || showJobStatus.equals("")) {
                    xact.holdJob(pauseId, job, "");
                } else {//??
                    if (showJobStatus.equals("?") || showJobStatus.equals("")) {
                        JOptionPane.showMessageDialog(null, "?????");
                        return;
                    }
                }
                // System.out.print("ts.getClusterId():" + showClusterId + "\n");
            } catch (RemoteException ex) {
                Logger.getLogger(MainFXMLController.class.getName()).log(Level.SEVERE, null, ex);
            }
        }

        try {
            xact.commit();
        } catch (RemoteException e) {

            e.printStackTrace();
        }

    } else if (n == JOptionPane.NO_OPTION) {
        System.out.println("qu xiao");

    }
}

From source file:condorclient.MainFXMLController.java

@FXML

void deleteButtonFired(ActionEvent event) {
    int delNo = 0;

    int n = JOptionPane.showConfirmDialog(null, "??", "",
            JOptionPane.YES_NO_OPTION);
    if (n == JOptionPane.YES_OPTION) {

        URL url = null;//from   w  w w  . j  a va  2s. co  m
        XMLHandler handler = new XMLHandler();
        String scheddStr = handler.getURL("schedd");
        try {
            url = new URL(scheddStr);
            // url = new URL("http://localhost:9628");
        } catch (MalformedURLException e3) {
            // TODO Auto-generated catch block
            e3.printStackTrace();
        }
        Schedd schedd = null;

        try {
            schedd = new Schedd(url);
        } catch (ServiceException ex) {
            Logger.getLogger(CondorClient.class.getName()).log(Level.SEVERE, null, ex);
        }

        //ClassAdStructAttr[]
        ClassAd ad = null;//birdbath.ClassAd;
        ClassAdStructAttr[][] classAdArray = null;

        int cluster = 0;

        int job = 0;
        Transaction xact = schedd.createTransaction();
        try {
            xact.begin(30);

        } catch (RemoteException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }
        final List<?> selectedNodeList = new ArrayList<>(table.getSelectionModel().getSelectedItems());
        String taskStatus = "";
        for (Object o : selectedNodeList) {
            if (o instanceof ObservableDisplayedClassAd) {
                delNo = Integer.parseInt(((ObservableDisplayedClassAd) o).getClusterId());
                taskStatus = ((ObservableDisplayedClassAd) o).getJobStatus();
                if (taskStatus.equals("")) {
                    JOptionPane.showMessageDialog(null, "?");
                    return;
                }
                String findreq = "owner==\"" + condoruser + "\"&&ClusterId==" + delNo;
                try {
                    classAdArray = schedd.getJobAds(findreq);
                } catch (RemoteException ex) {
                    Logger.getLogger(MainFXMLController.class.getName()).log(Level.SEVERE, null, ex);
                }
                for (ClassAdStructAttr[] x : classAdArray) {
                    ad = new ClassAd(x);
                    job = Integer.parseInt(ad.get("ProcId"));
                    try {
                        xact.closeSpool(delNo, job);

                        // System.out.print("ts.getClusterId():" + showClusterId + "\n");
                    } catch (RemoteException ex) {
                        Logger.getLogger(MainFXMLController.class.getName()).log(Level.SEVERE, null, ex);
                    }
                }
                try {
                    xact.removeCluster(delNo, "");
                } catch (RemoteException ex) {
                    Logger.getLogger(MainFXMLController.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }
        //end

        try {
            xact.commit();
        } catch (RemoteException e) {

            e.printStackTrace();
        }
        //??
        //            XMLHandler handler = new XMLHandler();
        int delNo1[] = new int[1];//
        delNo1[0] = delNo;
        handler.removeJobs(delNo1, 1);

    } else if (n == JOptionPane.NO_OPTION) {
        System.out.println("qu xiao");

    }

}