persistence@glassfish.java.net

Re: How to tell Glassfish Persistence to use TYPE = InnoDB when creating MySQL tables?

From: Erno Mononen <Erno.Mononen_at_Sun.COM>
Date: Thu, 01 Feb 2007 10:49:44 +0100

Hi Jon,

Jon Miller wrote:
> Hi all,
>
> I'm using Glassfish Persistence with a MySQL database. It's been
> awhile since I've used MySQL and I seem to recall you need to add the
> "TYPE = InnoDB" table option when creating a table if you want to use
> transactions with it. I've used Hibernate in the past and there was a
> "dialect" that you could use to tell it to use InnoDB rather than the
> default MyISAM. I'm wondering if there is something similar in TopLink?

Might not be an option for you, but it is possible to specify a default
table type (e.g. "default-table-type=innodb") in your MySQL config file.

Erno