Many people have wanted to use the code
generated by DODS in a non-Enhydra application. That is,
people want to use the DO and Query classes generated by
DODS in an application that does not extend Enhydra's
StandardApplication class.
Since
this version, DODS is independent from Enhydra. This
means that it is possible for user to make any
application (it doesn't need to be enhydra application)
that can use DODS.
The only thing that has to be done, is that non-Enhydra
applcation creates
new DatabaseManager and
registers it in DODS. For this, it is used DODS method:
org.enhydra.dods.DODS(String)
where String is name of the application's configuration
file (for example, "discRack.conf").
This
method should be added in applications main method. For
example:
public static void main (String[] args) {
try {
...
String fileName = "discRack.conf");
DODS.startup(fileName);
...
} catch (Exception ex) {
ex.printStackTrace();
System.exit(0);
}
DiscRack dr=new DiscRack();
}
|