return createDeployment();
}
private static Archive<?> createDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "stateful.war");
war.addPackage(StatefulBean.class.getPackage());
war.addPackage(EJBDirectory.class.getPackage());
war.setWebXML(StatefulBean.class.getPackage(), "web.xml");
war.addAsResource(new StringAsset(persistence_xml), "META-INF/persistence.xml");
System.out.println(war.toString(true));
return war;