3 Replies Latest reply on Jan 7, 2003 4:36 AM by jeditom

    CMP EJB has emptied my table!

    jeditom

      Hi guys, I was wondering if you could help me.

      I've finally managed to deploy a CMP2.0 EJB onto JBoss 3.0.3 with a MySQL DB. (There was much singing and dancing)

      I did a create and that worked, I did a findByPrimaryKey and that worked, but straight after that I went back to my database using the mysql command tool and the database table was empty. (Previously there was around 7 entries including the newly created one.)

      Any ideas as to why this happened and how I can prevent it?

      Many thanks!

      Tom

        • 1. Re: CMP EJB has emptied my table!
          frintrop

          hi ... do you have restartet jboss while looking for your database entries ?

          • 2. Re: CMP EJB has emptied my table!
            jeditom

            Hi,

            No, I had JBoss running in one window while mysql was running in another. After every create I looked in mysql to see if it worked - and it did.

            But when I close down JBoss (cleanly or otherwise) the data in the database disappears along with table!

            Please help!

            Thanks,

            Tom

            • 3. Re: CMP EJB has emptied my table!
              jeditom

              Thanks for the help, I got the answer when I posted a slightly different question...

              Specify...
              <jbosscmp-jdbc>



              <create-table>false</create-table>
              <remove-table>false</remove-table>

              in my jbosscmp-jdbc.xml file.

              Thanks in for your help anyway!

              Tom