-
1. Re: How to Clear(Reset) database with Jboss?
peterj Oct 6, 2008 4:12 PM (in response to pioner01)Are you using Hibernate or EJB3? If so, you could set hibernate.hbm2ddl.auto to "create" or "create-drop".
If you are using JDBC directly, or EJB2.x, you will probably have to use database tools to drop the tables or the table contents. Or you could have a servlets init method fire off the JDBC request. -
2. Re: How to Clear(Reset) database with Jboss?
pioner01 Oct 7, 2008 2:56 AM (in response to pioner01)It`s EJB3.0 project.
If so, you could set hibernate.hbm2ddl.auto to "create" or "create-drop".
For me it seems like a property to allow appserver to drop table`s but there is nothing how to force such procedure. -
3. Re: How to Clear(Reset) database with Jboss?
pioner01 Oct 7, 2008 3:53 AM (in response to pioner01)I`ve found a vendor specific solution for Postges but for sure that`s not what i want because the only place in project where i refer to postgres is in projectname-ds file in deploy directory and of course it may be changed to oracle ...etc.So such a utility to reset database shouldn`t depend on database vendor.
-
4. Re: How to Clear(Reset) database with Jboss?
peterj Oct 7, 2008 11:40 AM (in response to pioner01)Use "create-drop". The tables will be created at strup and dropped at shutdown (or perhaps simply replaced on next startup, I haven't watched the behavior that closely).