DODS FAQs - New Generator Options
dods.gif (11357 bytes)In release 4.0, the DODS accepts new options for generating code.

The usage for the dods script is

	dods target_dir myproject.doml [regen] [options]

When the 'regen' argument is supplied, the UI is not started; just the backend is run. This is often done by a project Makefile.

In Enhydra4, the backend accepts new options:

    -help         Shows this message.
    -enhydra3     Generate code compatible with Enhydra3
                  (the EAF in Enhydra4).
    -enhydra4     Generate code that uses Connections or DataSources
                  (instead of the DBTransactions used in Enhydra3).
                  This is the default.  Implies -jdbc1.
    -jdbc1        Generate code that accepts Connections as parameters.
                  Can be used with either -enhydra3 or -enhydra4.
    -jdbc2        Generate code that uses JNDI to lookup DataSources
                  to obtain Connections.
                  Implies -enhydra4.
    -no_ejb       Disable EJB code generators.
                  Implies -enhydra4.
    -lazy         Set lazy-loading=true for all data objects.
                  Referenced objects will be fetched only when needed.
    -vendor=      Specify database vendor:
                               Standard, Oracle, Msql, InstantDB,
                               Informix, Sybase, PostgreSQL.
                  This is handy for testing against various database vendors;
                  you don't need to change the 
                  line in your .doml file.

So, if you wanted to regenerate your data layer classes for Enhydra3, for an Oracle deployment, using JDBC1.0 drivers, you would run the dods script like so:

	dods target_dir myproject.doml regen -lazy -vendor=Oracle -enhydra3

These options can be concatenated, e.g.

    -lazy-vendor=Oracle-enhydra3
         or
    -lazy,-vendor=Oracle,-enhydra3

which is handy when the Ant taskdef is used to invoke DODS, e.g.:

    make ANT_ARGS=-DDODS_OPTIONS='-lazy,-vendor=Oracle,-enhydra3'

For all the latest information on DODS, please refer to http://dods.enhydra.org
Questions, comments, feedback? Let us know...