appModule.getWebModules().add(webModule);
appModule.getEjbModules().add(new EjbModule(ejbJar));
annotationDeployer.deploy(appModule);
AppInfo appInfo = factory.configureApplication(appModule);
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();