-->
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.  [ 4 posts ] 
Author Message
 Post subject: MySql InnoDB tables not persisting.
PostPosted: Mon Jul 12, 2004 10:06 pm 
Regular
Regular

Joined: Thu Jul 01, 2004 12:13 am
Posts: 68
Location: San Diego, CA
I have created a small app that is going against MySql 3.0.14. I am using iBatis to wrap Hibernate. Everything seems to be working fine from the unit test perspective (I see the keys incrementing in the output), but when I check the database to see if the records exist, they are not there.

The weird thing is that as soon as I alter the tables to not be InnoDB, then the records are there! Contrary to everything I read you should use InnoDB for tx functionality in the DB. Any ideas why this could be happening?

Another important aspect is that my entry point is with SLSB's that are using Required attribute on each method. Here's the code that I am using to save:

Code:
    protected Serializable save(Object obj) throws DaoException {
        Session s = null;
        try {
            s = getSession();
            Serializable rtn = s.save(obj);
            s.flush();
            return rtn;
        } catch (HibernateException e) {
            throw new DaoException(e);
        } finally {
            closeSession(s);
        }

    }


TIA,
Lou


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 13, 2004 7:29 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Use the transaction API.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 13, 2004 12:49 pm 
Regular
Regular

Joined: Thu Jul 01, 2004 12:13 am
Posts: 68
Location: San Diego, CA
michael wrote:
Use the transaction API.


That's what I'm using SLSB's for; they are providing Container Managed Transactions for me. Moreover, I tried using programmatic transactions at first and that didn't work either.

Thanks,
Lou


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 13, 2004 4:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Hm, no idea then.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.