List of usage examples for org.springframework.remoting RemoteInvocationFailureException printStackTrace
public void printStackTrace()
From source file:test.annotated.splitaggregate.AnnotationTest.java
public static void main(String[] args) { // Test Job//from w w w . j av a 2 s . c o m AnnotatedSATestJob annoatedJob = new AnnotatedSATestJob(); try { GridNode node = Grid.startLightGridNode(); log.info("GridNode ID : " + node.getId()); // Submit Job log.debug("Submitting Job"); GridJobFuture future = node.getJobSubmissionService().submitJob(annoatedJob); try { log.info("Job Result : " + future.getResult()); } catch (RemoteInvocationFailureException e) { e.getCause().printStackTrace(); } node.getNodeRegistrationService().unregister(); log.info("Unregistered, Terminating..."); } catch (Exception e) { e.printStackTrace(); } System.exit(0); }
From source file:test.node.TestNodeRunner.java
public static void main(String[] args) { // Test Job/*w w w . j a v a 2 s . c o m*/ TestJob testJob = new TestJob(); try { log.info("GridNode Starting..."); StopWatch sw = new StopWatch(); sw.start(); GridNode node = Grid.startGridNode(); log.info("GridNode ID : " + node.getId()); sw.stop(); log.info("GridNode Started Up. [" + sw.getLastTaskTimeMillis() + " ms]"); // Submit Job log.debug("Submitting Job"); sw.start(); GridJobFuture future = node.getJobSubmissionService().submitJob(testJob, new ResultCallback() { public void onResult(Serializable result) { System.err.println(result); } }); try { log.info("Job Result : " + future.getResult()); } catch (RemoteInvocationFailureException e) { e.getCause().printStackTrace(); } sw.stop(); log.info("GridJob Finished. Duration " + sw.getLastTaskTimeMillis() + " ms"); log.debug("Press any key to unregister GridNode and terminate"); System.in.read(); node.getNodeRegistrationService().unregister(); log.info("Unregistered, Terminating..."); System.exit(0); } catch (IOException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } }