Context ctx = new InitialContext();
// sed kicks ass
System.out.print(++test+"- "+"Looking up the XATest home...");
XATestHome home;
try {
home = (XATestHome) ctx.lookup("XATest");
if (home == null) throw new Exception("No Home!");
log.debug("OK");
} catch (Exception e) {
// sed kicks ass
log.debug("Could not lookup the context: the beans are probably not deployed");
log.debug("Check the server trace for details");
throw e;
}
// sed kicks ass
System.out.print(++test+"- "+"Creating an the XATest bean...");
XATest bean;
try {
bean = home.create();
if(bean == null) throw new Exception("No Bean!");
log.debug("OK");
} catch (Exception e) {
// sed kicks ass
log.debug("Could not create the bean!");