I see that the default filename for "ojb.properties" lacks a "/" prefix and
therefore does not get loaded from the classpath.

My fix (I want the config to load off the classpath as expected) has been to
add
    static {
        System.setProperty("OJB.properties", "/ojb.properties");
    }
to the application, so that deploying in a servlet container works with
ojb.properties in the classes directory.

But it seems like it would make more sense for the default setting in
OJBConfiguration.load() to be:
    protected void load()
    {
        // properties file may be set as a System property.
        // if no property is set take default name.
        String fn = System.getProperty("OJB.properties", "/OJB.properties");
        setFilename(fn);
        super.load();

Regards,
Steve Meyfroidt

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to