users@glassfish.java.net

Re: DBSchema Auto-Generation is Incorrect

From: <glassfish_at_javadesktop.org>
Date: Fri, 31 Jul 2009 19:24:19 PDT

Thanks for the link Rochelle. Had some good info, but I didn't find any of the table or column names that I was using as reserved words in the list. Therefore, while it seemed to be in the right area that was not the issue.

Going back to my earlier comment about the DBScema file still being generated while the database was down peaked my interest further so I decided to try a couple different things. The short story and the solution turned out to be that whenever the DBSchema is allowed to be generated during deployment, it is not using the Database at all, its using the ejb-jar.xml and other mapping files to generate the DBschema. From the glassfish documentation I was under the impression it was using the jndi DataSource defined to connect to the database. Guess not. I renamed the EJB from User to Usr and the DBSchema file was generated correctly.

Thought I would post this in case anyone else could benefit from it.

Thanks

Mark
[Message sent by forum member 'markag' (markag)]

http://forums.java.net/jive/thread.jspa?messageID=358439