List of usage examples for org.springframework.remoting RemoteConnectFailureException getMessage
@Override
@Nullable
public String getMessage()
From source file:com.aan.girsang.client.launcher.ClientLauncher.java
public static void main(String[] args) throws Exception { BeautyEyeLNFHelper.frameBorderStyle = BeautyEyeLNFHelper.FrameBorderStyle.generalNoTranslucencyShadow; org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper.launchBeautyEyeLNF(); UIManager.put("RootPane.setupButtonVisible", Boolean.FALSE); try {/*from w ww. j a v a 2s. c o m*/ AbstractApplicationContext ctx = new ClassPathXmlApplicationContext("clientContext.xml"); ctx.registerShutdownHook(); constantService = (ConstantService) ctx.getBean("constantServiceRemote"); securityService = (SecurityService) ctx.getBean("securityServiceRemote"); masterService = (MasterService) ctx.getBean("masterServiceRemote"); transaksiService = (TransaksiService) ctx.getBean("transaksiServiceRemote"); reportService = (ReportService) ctx.getBean("reportServiceRemote"); String computerName = InetAddress.getLocalHost().getHostName(); constantService.clientOnline(computerName); } catch (RemoteConnectFailureException ex) { String status = "Server Offline"; ex.printStackTrace(); log.info(ex.getMessage()); JOptionPane.showMessageDialog(null, status); System.exit(0); } log.info("Client Online"); java.awt.EventQueue.invokeLater(() -> { FrameUtama fu = new FrameUtama(); fu.setExtendedState(JFrame.MAXIMIZED_BOTH); fu.setVisible(true); fu.jam(); }); }
From source file:org.yamj.filescanner.service.SendToCore.java
@Override public StatusType call() { StatusType status;/*from w ww .j a v a2s . c om*/ try { LOG.debug("Sending: {}", importDto.getBaseDirectory()); fileImportService.importScanned(importDto); LOG.debug("{}: Successfully queued", importDto.getBaseDirectory()); status = StatusType.DONE; } catch (RemoteConnectFailureException ex) { LOG.error("{}: Failed to connect to the core server: {}", importDto.getBaseDirectory(), ex.getMessage()); status = StatusType.ERROR; } catch (RemoteAccessException ex) { LOG.error("{}: Failed to send object to the core server: {}", importDto.getBaseDirectory(), ex.getMessage()); status = StatusType.ERROR; } // Whether or not the message was sent, quit LOG.info("{}: Exiting with status {}, remaining threads: {}", importDto.getBaseDirectory(), status, runningCount.decrementAndGet()); return status; }
From source file:org.yamj.filescanner.service.SystemInfoCore.java
/** * Attempt to connect to the core server and get a response * * @return// w ww . j a v a 2s .c om */ private boolean pingCore() { lastCheck = new DateTime(); Boolean status; try { String pingResponse = pingService.ping(); LOG.info("Ping response: {}", pingResponse); status = Boolean.TRUE; } catch (RemoteConnectFailureException ex) { LOG.error("Failed to connect to the core server: {}", ex.getMessage()); status = Boolean.FALSE; } catch (Exception ex) { // Hate catching general exceptions, but should determine how this is thrown LOG.error("General failure to connect to the core server: {}", ex.getMessage()); status = Boolean.FALSE; } connected = status; return status; }
From source file:org.yamj.filescanner.ScannerManagementImpl.java
private void checkGitHubStatus() { try {/*www.j a va 2 s. c o m*/ DateTime fsDate = YAMJ_INFO.getBuildDateTime(); boolean installationOk = githubService.checkInstallationDate(fsDate, MAX_INSTALL_AGE); if (installationOk) { LOG.info("Installation is less than {} days old.", MAX_INSTALL_AGE); } else { LOG.error("***** Your installation is more than {} days old. You should consider updating! *****", MAX_INSTALL_AGE); } } catch (RemoteConnectFailureException ex) { LOG.warn("Failed to get GitHub status, error: {}", ex.getMessage()); } catch (RemoteAccessException ex) { LOG.warn("Failed to get GitHub status, error: {}", ex.getMessage()); } }