/** * */ package de.test; import javax.ejb.Stateless; /** * @author sjankus * */ @Stateless public class TestServerBean implements TestServer { /** Time to wait for this process */ private static long TIME_TO_WAIT = 1000; /** * This methode is simulating a serverprocess which takes a specified time. * After waiting it returns Boolean.TRUE if everything is OK. * * @param name of the process * @return Boolean.TRUE if everything is OK * @see TIME_TO_WAIT * @see de.test.TestServer#doTest(java.lang.String) */ @Override public Boolean doTest(String name) { System.out.println(name + " is starting"); try { Thread.sleep(TIME_TO_WAIT); } catch (InterruptedException e) { e.printStackTrace(); return Boolean.FALSE; } System.out.println(name + " is finished"); return Boolean.TRUE; } }