utils.addDeployment("ejb3-mbean.sar", Test.class.getPackage());
utils.deploy();
MBeanServerConnection mbeanServer = utils.getConnection();
SimpleStatelessSessionLocal bean = createProxy(mbeanServer, "java:global/ejb3-example/SimpleStatelessSessionBean!" + SimpleStatelessSessionLocal.class.getName(), SimpleStatelessSessionLocal.class);
String msg = bean.echo("Hello world");
System.out.println(msg);
final String result = (String)mbeanServer.invoke(new ObjectName("jboss:name=ejb3-test,type=service"), "callAsync", new Object[] {"java:global/ejb3-example/AsyncBean!" + AsyncLocal.class.getName(), "Hello World"}, new String[] {String.class.getName(), String.class.getName()});
System.out.println(result);