AppModule app = new AppModule(this.getClass().getClassLoader(), "testapp");
Connector connector = new Connector("email-ra");
ResourceAdapter adapter = new ResourceAdapter(EmailResourceAdapter.class);
connector.setResourceAdapter(adapter);
InboundResourceadapter inbound = adapter.setInboundResourceAdapter(new InboundResourceadapter());
MessageAdapter messageAdapter = inbound.setMessageAdapter(new MessageAdapter());
MessageListener listener = messageAdapter.addMessageListener(new MessageListener(EmailConsumer.class, EmailAccountInfo.class));
listener.getActivationSpec().addRequiredConfigProperty("address");
app.getConnectorModules().add(new ConnectorModule(connector));
EjbJar ejbJar = new EjbJar();