Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, LocalInitialContextFactory.class.getName());
InitialContext ctx = new InitialContext(properties);
EncStatefulHome home = (EncStatefulHome) ctx.lookup(AnnotatedFieldInjectionStatefulBean.class.getSimpleName());
EncStatefulObject ejbObject = home.create("foo");
ejbObject.lookupStringEntry();
// Undeploy the file
assembler.destroyApplication(file.getCanonicalPath());
// Try and execute the bean after it's been undeployed -- should fail