*
* @throws Exception
*/
public void testFromWebAppContextNonJta() throws Exception {
ResourceInfo supplied = addDataSource("orange-web", OrangeDriver.class, "jdbc:orange-web:some:stuff", false);
assertSame(supplied, resources.get(0));
PersistenceUnit persistenceUnit = new PersistenceUnit("orange-unit");
ClassLoader cl = this.getClass().getClassLoader();
AppModule app = new AppModule(cl, "orange-app");
app.getPersistenceModules().add(new PersistenceModule("root", new Persistence(persistenceUnit)));
WebApp webApp = new WebApp();
webApp.setMetadataComplete(true);
app.getWebModules().add(new WebModule(webApp, "orange-web", cl, "war", "orange-web"));
// Create app
AppInfo appInfo = config.configureApplication(app);
assembler.createApplication(appInfo);
// Check results
ResourceInfo generated = resources.get(1);
assertEquals(supplied.id + "Jta", generated.id);
assertEquals(supplied.service, generated.service);
assertEquals(supplied.className, generated.className);
assertEquals(supplied.properties.get("JdbcDriver"), generated.properties.get("JdbcDriver"));
assertEquals(supplied.properties.get("JdbcUrl"), generated.properties.get("JdbcUrl"));