Hi.

Looking at class
org.apache.ojb.broker.util.configuration.impl.OjbConfiguration ,method
load() :
  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);

i.e. it seems you can specify the filename in the system property
OJB.properties 

Note that it will still try to load it from the class path - and then, if
that fails, try to use the file name as a filename (see 
org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl,
method load)

So....

specify on the command line that start the JVM the following :
-DOJB.properties=/fullpath/to/MyOJB.properties
or
-DOJB.properties=c:/temp/MyOJB.properties

I haven't tried this.

Note that this in the java commandline - if you are doing a WebApp, you will
need to ensure that the properties are set when the ServletContainer is
started e.g. for TOMCAT you probably will have to change the catalina.bat
file...

HTH,

Cheers,

Charles.


>-----Original Message-----
>From: Jason Pyeron [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, August 27, 2003 5:15 PM
>To: OJB Users List
>Subject: OJB.properties location issue...
>
>
>To all,
>
>For silly reasons we are not allowed to put the OJB.properties 
>file in a 
>CLASSPATH directory.
>
>Can the properties be spcified from the java code or better 
>yet, can the 
>location (and name?) of OJB.properties be specified?
>
>TIA
>
>Jason Pyeron
>
>
>-- 
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>-                                                               -
>- Jason Pyeron                   http://www.pyerotechnics.com   -
>- Partner & Sr. Manager         Pyerotechnics Development, Inc. -
>-                               500 West University Parkway #1S -
>- +1 (410) 808-6646             Baltimore, Maryland  21210-3253 -
>-                                                               -
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
>This message is for the designated recipient only and may contain 
>privileged, proprietary, or otherwise private information. If you 
>have received it in error, purge the message from your system and 
>notify the sender immediately.  Any other use of the email by you 
>is prohibited.
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


This email and any attachments are strictly confidential and are intended
solely for the addressee. If you are not the intended recipient you must
not disclose, forward, copy or take any action in reliance on this message
or its attachments. If you have received this email in error please notify
the sender as soon as possible and delete it from your computer systems.
Any views or opinions presented are solely those of the author and do not
necessarily reflect those of HPD Software Limited or its affiliates.

 At present the integrity of email across the internet cannot be guaranteed
and messages sent via this medium are potentially at risk.  All liability
is excluded to the extent permitted by law for any claims arising as a re-
sult of the use of this medium to transmit information by or to 
HPD Software Limited or its affiliates.



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

Reply via email to