1 Reply Latest reply on Dec 23, 2001 3:09 AM by acarrano

    Unable to persist over INNODB tables in MySQL

    csmike

      Hi All,

      I was running Jboss2.2.2 with MySQL. Everything ran fine with MySQL using default table-type "MyISAM"; however, when I switched to use "InnoDB" table-type. I was allowed to retreive data from those tables only but when I call "Create", I didn't receive any exception and neither the data being persisted in the tables.

      I hope someone can give me some help/suggestion. In addition, if someone who has sussessfully using "InnoDB" with JBoss for transaction, would you mind sharing the ways to get them to work??

      Greatly appreciated for any help/suggestion.

      Michael

        • 1. Re: Unable to persist over INNODB tables in MySQL
          acarrano

          I have seen this behavior when the EJB's transaction attribute is not set to "Required" (on your ejb-jar.xml file). You can set it to "Required" (as shown in the example below) and that should store the EJB on your table.

          <ejb-jar>
          <assembly-descriptor>
          ...
          <container-transaction>

          <ejb-name>EcommerceCustomerBean</ejb-name>
          <method-name>*</method-name>

          <trans-attribute>Required</trans-attribute>
          </container-transaction>
          ...
          </assembly-descriptor>
          </ejb-jar>

          This is not a very good solution since setting this attribute to Required on all of your entity EJB's may reduce performace.