Could specify a property in the server.xml I guess. But I'd rather see the config file picked up like any other resource from the classpath.
The code for loading config in OJB looks slightly over-complex. I wonder if there's a reason for that? Or can it be replaced with the same mechanism that (for example) log4j uses. We've had a lot of trouble simply getting OJB to run due to this problem. Steve > -----Original Message----- > From: Anthony Kong [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 10, 2003 3:52 AM > To: 'OJB Users List' > Subject: RE: ojb.properties and classpath > > > > Hi, Steve, > > Do you think it is possible to dictate the location of the > OJB.properties in > servlet, much like the command line does? e.g. > > java -classpath .:myapp:$CLASSPATH > -DOJB.properties=myapp/OJB.properties > myapp.app > > > Regards, > > Anthony > > > > -----Original Message----- > From: Steve Meyfroidt [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 09, 2003 9:40 PM > To: [EMAIL PROTECTED] > Cc: Rob Newsome > Subject: ojb.properties and classpath > > > 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]> > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
