Author: arminw
Date: Wed May 31 10:58:41 2006
New Revision: 410615
URL: http://svn.apache.org/viewvc?rev=410615&view=rev
Log:
add ojb.properties path attribute
Modified:
db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/configuration/impl/ConfigurationAbstractImpl.java
db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/configuration/impl/OjbConfiguration.java
Modified:
db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/configuration/impl/ConfigurationAbstractImpl.java
URL:
http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/configuration/impl/ConfigurationAbstractImpl.java?rev=410615&r1=410614&r2=410615&view=diff
==============================================================================
---
db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/configuration/impl/ConfigurationAbstractImpl.java
(original)
+++
db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/configuration/impl/ConfigurationAbstractImpl.java
Wed May 31 10:58:41 2006
@@ -45,6 +45,8 @@
/**the name of the properties file*/
protected String filename;
+ protected String ojbPropertiesFilePath;
+
/**the properties object holding the configuration data*/
protected Properties properties;
@@ -403,6 +405,15 @@
}
/**
+ * Returns the path to <em>OJB.properties</em> file.
+ * @return The path to properties file.
+ */
+ public String getOjbPropertiesFilePath()
+ {
+ return ojbPropertiesFilePath;
+ }
+
+ /**
* Loads the Configuration from the properties file.
*
* Loads the properties file, or uses defaults on failure.
@@ -433,6 +444,7 @@
InputStream strIn = conn.getInputStream();
properties.load(strIn);
strIn.close();
+ ojbPropertiesFilePath = url.getPath();
}
catch (FileNotFoundException ex)
{
Modified:
db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/configuration/impl/OjbConfiguration.java
URL:
http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/configuration/impl/OjbConfiguration.java?rev=410615&r1=410614&r2=410615&view=diff
==============================================================================
---
db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/configuration/impl/OjbConfiguration.java
(original)
+++
db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/configuration/impl/OjbConfiguration.java
Wed May 31 10:58:41 2006
@@ -57,6 +57,8 @@
public static final String OJB_PROPERTIES_FILE = "OJB.properties";
/** Default filename of the OJB repository metadata file */
public static final String OJB_METADATA_FILE = "repository.xml";
+ /** Property name of <em>OJB.properties</em> file path. **/
+ public static final String OJB_PROPERTIES_PATH_PROP =
"ojb.properties.path";
/** the repository file keeping the O/R Metadata*/
private String repositoryFilename;
@@ -294,6 +296,8 @@
PoolConfiguration.DEFAULT_WHEN_EXHAUSTED_ACTION);
useSerializedRepository = getBoolean("useSerializedRepository", false);
+
+ properties.setProperty(OJB_PROPERTIES_PATH_PROP,
getOjbPropertiesFilePath());
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]