-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: new records lost after tomcat stops
PostPosted: Wed May 18, 2011 2:23 am 
Newbie

Joined: Tue Sep 22, 2009 7:27 am
Posts: 4
Hello,

i have to adapt a MS Access database in a spring application with hibernate. Reading from and writing to the database works. But when i stop tomcat the newly written records are delted. Seems like a transaction gets rolled back. What can i do?

Here is my hibernate configuration:

<bean id="hibernateSessionFactoryMSAccess"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">

<property name="mappingResources">
<list>
<value>de/kraemerit/msl/repository/Article.hbm.xml</value>
<value>de/kraemerit/msl/repository/Customer.hbm.xml</value>
<value>de/kraemerit/msl/repository/Order.hbm.xml</value>
<value>de/kraemerit/msl/repository/OrderPosition.hbm.xml</value>
<value>de/kraemerit/msl/repository/TestDomain.hbm.xml</value>
</list>
</property>

<!-- <property name="dataSource" ref="dataSourceMySQL" /> -->
<property name="hibernateProperties">
<props>

<prop key="hiberante.show_sql">true</prop>

<prop key="hibernate.connection.username" />
<prop key="hibernate.connection.password" />
<prop key="hibernate.dialect">com.hxtt.support.hibernate.HxttAccessDialect</prop>
<prop key="hibernate.connection.url">jdbc:access:///d:/database.mdb?delayedClose=0</prop>
<prop key="hibernate.connection.driver_class">com.hxtt.sql.access.AccessDriver</prop>

<!-- <prop key="hibernate.show_sql">false</prop> -->
<prop key="hibernate.format_sql">false</prop>
<prop key="hibernate.use_sql_comments">false</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>

</props>
</property>
</bean>


Top
 Profile  
 
 Post subject: Re: new records lost after tomcat stops
PostPosted: Thu May 19, 2011 6:39 am 
Newbie

Joined: Fri Dec 24, 2010 2:08 pm
Posts: 6
Hi Friend,

Can you please provide your java file snippets


Top
 Profile  
 
 Post subject: Re: new records lost after tomcat stops
PostPosted: Thu May 19, 2011 6:08 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
looks like you're not committing the transaction

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.