TestENC bean = (TestENC)new InitialContext().lookup("ENCBean"); bean.accessENC(); System.out.println("Successfully accessed bean resource references"); bean.remove();