users@glassfish.java.net

Bug with toplink.ddl-generation.output-mode = database ?

From: <glassfish_at_javadesktop.org>
Date: Mon, 18 Feb 2008 09:49:11 PST

Hi All.

I use toplink-essentials-2.0-58g in a standalone mode (web app in Tomcat) and can not make it stop creating DDL files (createDDL.jdbc and dropDDL.jdbc).
When I specify
<property name="toplink.ddl-generation.output-mode" value="database"/>
It still behaves like the default "both"; that is it creates the tables in the database [b]and[/b] DDL files in the file system. I need it to stop writing to the file system.

Debugging revealed the offending lines of [i]oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider[/i]:

----------------------------------------------------
            // The inSEmode checks here are only temporary to ensure we still
            // play nicely with Glassfish.
            if (ddlGenerationMode.equals(DDL_DATABASE_GENERATION) || inSEmode) {
                runInSEMode(mgr, shouldDropFirst);
                
[b] if (inSEmode) {
                    writeDDLsToFiles(mgr, appLocation, createDDLJdbc, dropDDLJdbc);
                }
[/b] } else if (ddlGenerationMode.equals(DDL_SQL_SCRIPT_GENERATION)) {
                writeDDLsToFiles(mgr, appLocation, createDDLJdbc, dropDDLJdbc);
            } else if (ddlGenerationMode.equals(DDL_BOTH_GENERATION)) {
                runInSEMode(mgr, shouldDropFirst);
                writeDDLsToFiles(mgr, appLocation, createDDLJdbc, dropDDLJdbc);
            }
----------------------------------------------------

I don't understand why the lines in bold are there.
I checked sources for both versions V2UR1_source_09d and V2.1_source_21 -- they contain the same code.

Am I misunderstanding something or is it really a bug?

Best regards,
Sultan
[Message sent by forum member 'sultanbek' (sultanbek)]

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