// add application dependency on H2 JDBC driver, so that the Hibernate classloader (same as app classloader)
// will see the H2 JDBC driver.
// equivalent hack for use of shared Hibernate module, would be to add the H2 dependency directly to the
// shared Hibernate module.
// also add dependency on org.slf4j
ear.addAsManifestResource(new StringAsset("<jboss-deployment-structure>" + " <deployment>" + " <dependencies>"
+ " <module name=\"com.h2database.h2\" />" + " <module name=\"org.slf4j\"/>" + " </dependencies>"
+ " </deployment>" + "</jboss-deployment-structure>"), "jboss-deployment-structure.xml");
return ear;
}