1 Reply Latest reply on May 24, 2006 2:36 PM by eielk

    configuring persistence properties for based on release note

    eielk

      i updated the /default/deploy/ejb.deployer/Meta-inf/persistence.xml file based on the release notes for 4.0.4.cr2 but it doesn't change the setting. my ejb3 app works great on 4.0.4.rc1 and shows flush=enabled but now after upgrade it won't write to the db (flush) and my server startup output shows that the flush is disabled.... how can i update this setting? is there another file i need to update?

      any ideas would be helpful thanks.

      another question? i am using stateless session beans and by default it uses REQUIRED for transaction management, so why is this affecting me, according to the release notes it is only for non-transactional db calls?

      here is the output snippet from server startup showing the flush-disabled.

      13:49:19,130 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
      13:49:19,490 INFO [SettingsFactory] RDBMS: MySQL, version: 4.1.18-nt
      13:49:19,490 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-jav
      a-3.1.12 ( $Date: 2005-11-17 15:53:48 +0100 (Thu, 17 Nov 2005) $, $Revision$ )
      13:49:19,537 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
      13:49:19,537 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.J
      oinableCMTTransactionFactory
      13:49:19,552 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hib
      ernate.transaction.JBossTransactionManagerLookup
      13:49:19,552 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
      13:49:19,552 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
      13:49:19,552 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
      13:49:19,552 INFO [SettingsFactory] JDBC batch size: 15
      13:49:19,552 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
      13:49:19,552 INFO [SettingsFactory] Scrollable result sets: enabled
      13:49:19,552 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
      13:49:19,552 INFO [SettingsFactory] Connection release mode: after_statement
      13:49:19,552 INFO [SettingsFactory] Maximum outer join fetch depth: 2
      13:49:19,552 INFO [SettingsFactory] Default batch fetch size: 1
      13:49:19,552 INFO [SettingsFactory] Generate SQL with comments: disabled
      13:49:19,552 INFO [SettingsFactory] Order SQL updates by primary key: disabled
      13:49:19,552 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFacto
      ry


        • 1. Re: configuring persistence properties for based on release
          eielk

          i'm using 4.0.4.GA now with no issues and i found the answer i was looking for by updating my persistence.xml properties with the correct flush modes: auto and commit.

          <persistence>
           <persistence-unit name="gwigPersistence">
           <jta-data-source>java:/MySqlDS</jta-data-source>
          
           <properties>
           <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
           <property name="hibernate.transaction.flush_before_completion" value="commit"/>
           <property name="hibernate.transaction.auto_close_session" value="true"/>
           </properties>
          
           </persistence-unit>
          </persistence>