persistence@glassfish.java.net

RE: Code reviews for Issues 139 and 335

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Mon, 13 Mar 2006 10:28:57 -0500

Hello Pramod,
    These changes look good.
--Gordon
  -----Original Message-----
  From: Pramod Gopinath [mailto:Pramod.Gopinath_at_Sun.COM]
  Sent: Thursday, March 09, 2006 9:15 PM
  To: persistence_at_glassfish.dev.java.net
  Cc: Gordon Yorke; Peter Krogh
  Subject: Re: Code reviews for Issues 139 and 335


  Hi Gordon / Peter
    There was one more file that I had missed in my earlier jar. Hence resending the jar.

  Thanks
  Pramod

  Pramod Gopinath wrote:
    Hi Gordon / Peter

    Issues being addressed :

    139 - Java2DB does not drop sequences during undeploy/redeploy
    335 - Generator Table of TableGenerator getting dirty + no PK on name column with derby

    Peter had suggested in issue 139 to provide some code snippets that would help to drop the sequence table. But doing this would cause problems, specifically in cases where there are multiple applications sharing the same sequence generator table. So instead of dropping the entire table I have made changes to the code to ensure that we just issue a delete statement to just drop the row that is associated for this particular applicaton. In short for entities in this application that are using sequence generator table would have the row dropped.

    In case of issue 335, ensured that we would create the sequence table with the sequence name as a primary key for that sequence. This would ensure that we do not insert multiple rows of the same sequence name into the generator table.

    As part of these code changes I had refactored code and ensured that I define new methods and retain the behavior of the old methods as is (for backward compatibility.

    I have attached a jar containing the sources as well as the diff files.
    Thanks
    Pramod

----------------------------------------------------------------------------