"Sammy8306" wrote : The answers to those question would depend on the contents of your persistence.xml file, may be you can post that?
Hi, I also try a lot of things to do in persistance.xml. My persistance.xml look like this: | | <?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" | xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" | version="1.0"> | | <persistence-unit name="video_library" transaction-type="JTA"> | | <provider>org.hibernate.ejb.HibernatePersistence</provider> | <jta-data-source>java:/video_libraryDatasource</jta-data-source> | | <properties> | | <!-- database connection properties --> | <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" /> | <property name="hibernate.connection.url" value="jdbc:hsqldb:./db/" /> | <property name="hibernate.connection.username" value="sa" /> | <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" /> | | <!-- JDBC connection pool (use the built-in) --> | <property name="connection.pool_size" value="5" /> | | <!-- Enable Hibernate's automatic session context management --> | <property name="hibernate.current_session_context_class" value="thread" /> | | <!-- enable OSCacheProvider as second-level cache provider --> | <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" /> | | <!-- use query cache (individual queries should still be cacheable) --> | <property name="hibernate.cache.use_query_cache" value="true" /> | | <!-- with this option we can also completely disable second level cache --> | <property name="hibernate.cache.use_second_level_cache" value="true" /> | | <!-- force hibernate to cache all data in humanreadable format --> | <property name="hibernate.cache.use_structured_entries" value="true" /> | | <!-- Echo all executed SQL to stdout --> | <property name="show_sql" value="true" /> | | <!-- preety print of all SQL-Statements --> | <property name="hibernate.format_sql" value="false" /> | | <!-- Drop and re-create the database schema on startup --> | <property name="hbm2ddl.auto" value="create-drop" /> | | <!-- enable generation of statistics --> | <property name="hibernate.generate_statistics" value="true" /> | | <property name="jboss.entity.manager.factory.jndi.name" value="java:/video_libraryEntityManagerFactory"/> | | <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" /> | | | </properties> | | </persistence-unit> | | </persistence> | I think that the action "create-drop" should do some stuff for me. At least I have always use it in row hibernate and I have not any problems with existing database. Thx for responding! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041455#4041455 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041455 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
