This content has been marked as final.
Show 3 replies
-
1. Re: customize name of persistence.xml
skajotde Jul 24, 2008 10:29 AM (in response to skajotde)I know that is option with :
// AssembledDirectory jar = AssembledContextFactory.getInstance().create("ejbTestCase.jar"); // jar.addClass(Customer.class); // jar.addClass(CustomerDAOBean.class); // jar.addClass(CustomerDAOLocal.class); // jar.addClass(CustomerDAORemote.class); // jar.mkdir("META-INF").addResource("tutorial-persistence.xml", "persistence.xml");
In this persistence.xml is alias for additional file but unfortunately jboss embedded with hibernate doesn't work with vfs ;/ -
2. Re: customize name of persistence.xml
skajotde Jul 24, 2008 10:33 AM (in response to skajotde)There is solution what I had seek ;)
In file /testejb3-jbossembedded-beta3/src/main/jbossembeddedconf/deployers/ejb3-deployers-beans.xml (file from jboss embedded) I had to add line in bean PersistenceUnitParsingDeployer.<property name="name">persistence-integration-tests.xml</property>
PersistenceUnitParsingDeployer is cool ;) -
3. Re: customize name of persistence.xml
skajotde Jul 24, 2008 11:01 AM (in response to skajotde)"skajotde" wrote:
In this persistence.xml is alias for additional file but unfortunately jboss embedded with hibernate doesn't work with vfs ;/
https://jira.jboss.org/jira/browse/EJBTHREE-1254 - Exploded jar (inside EAR) containing persistence.xml with jar-file element fails to deploy