Hallo,
we have a JBoss 4.2.3 project. Our build-master has recently modified the build so that
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
is no longer part of the persistence.xml
Before that, all tables of the application have been dropped during the shutdown of the server.
Now I want to have this behavior back and deploy an exploded ear with an expoloded jar. I modify the META-INF/persistence.xml to get
Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="BLA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/BLA</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="jboss.entity.manager.jndi.name" value="java:/bafoeg21EntityManager" />
</properties>
</persistence-unit>
</persistence>
When I shutdown the server the tables are not dropped, but some (and only some !) of the data is deleted.
I suspect that somehow the old behavior of dropping the tables is overridden in the application, but I have no idea where to look.
Any ideas?