final AppContext application = assembler.createApplication(appInfo);
Context ctx = (Context) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class<?>[]{Context.class}, new InvocationHandler() {
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if (args.length == 1 && args[0].equals("SimpleEJBLocalBean")) {
return new SimpleEJB();
}
return method.invoke(new InitialContext(), args);
}
});