1 Reply Latest reply on Apr 14, 2011 9:28 AM by Leo van den berg

    Dataloss when shutting down seam application on Weblogic 10.3.3

    Florian Quadt Newbie


      we are developing a Seam application (JavaBeans, WAR) on JBoss AS 4.2.3. In this environment everything is running fine. But the targeted production environment is a Weblogic 10.3.3 server. Here we are experiencing data loss when shutting down the Weblogic server using the shutdown script stopWeblogic.sh.

      During startup of the application we get the following warning:
      WARNING: JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession()>

      At the end of the shutdown we get the following warning:
      <Warning> <Common> <BEA-000632> <Resource Pool "myDatasource" shutting down, ignoring 1 resources still in use by applications..>
      myDatasource is an Oracle Datasource and is behaving fine, but we have a second datasource (local H2 database) which seems not being properly closed during server shutdown. After the application server has been restarted some data from the H2 datasource are missing.


      <?xml version="1.0" encoding="UTF-8"?>
      <!-- Persistence deployment descriptor for dev profile -->
      <persistence xmlns="http://java.sun.com/xml/ns/persistence" 
                   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
         <persistence-unit name="atarrabi" transaction-type="RESOURCE_LOCAL">
               <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
                    * validate: validate the schema, makes no changes to the database.
                    * update: update the schema.
                    * create: creates the schema, destroying previous data.
                    * create-drop: drop the schema at the end of the session.
      <!--         <property name="hibernate.hbm2ddl.auto" value="create"/> -->
      <!--         <property name="hibernate.hbm2ddl.auto" value="create-drop"/> -->
              <property name="hibernate.hbm2ddl.auto" value="update"/>
      <!--         <property name="hibernate.hbm2ddl.auto" value="validate"/>-->
               <property name="hibernate.show_sql" value="false"/>
               <property name="hibernate.format_sql" value="false"/>
               <property name="hibernate.use_sql_comments" value="false"/>
               <!-- weblogic specific -->
               <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>
                 <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/> 

      Ideas are really appreciated!



        • 1. Re: Dataloss when shutting down seam application on Weblogic 10.3.3
          Leo van den berg Master


          Just guessing now, because I am a real JBoss-AS fan:

          Your log says its all:

          myDatasource" shutting down, ignoring 1 resources still in use by applications..

          Which basically says the server doesn't interact in any decent way with the datasource. This is a serious problem and - if it is default behaviour of Weblogic - can only be resolved by using an application shutdown which closes everything before you shutdown the server.


          P.S. maybe you should use JBoss for production and Weblogic for prototyping, I am sure it will improve the stability of your application. ;-)