com.ibm.mm.sdk.common
Class DKPropertyPoolJDBC
java.lang.Object
|
+--com.ibm.mm.sdk.common.DKPropertyPoolJDBC
- All Implemented Interfaces:
- DKConstant, DKMessageId, java.io.Serializable
- public class DKPropertyPoolJDBC
- extends java.lang.Object
- implements DKMessageId, DKConstant, java.io.Serializable
DKPropertyPoolJDBC: This class is used to parse the properties from an input file.
The input file could be an URL (full path with file name) or any file name with
full path. After constructor, the getProperty(key) will return the value of the
specified key.
- See Also:
- Serialized Form
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId |
For details, see the class or interface |
Fields inherited from interface com.ibm.mm.sdk.common.DKConstant |
For details, see the class or interface |
Constructor Summary |
DKPropertyPoolJDBC()
Constructor without input, use the default property file "cmbpooljdbc.ini"
the "cmbpooljdbc.ini" must be in the current directory of application program |
DKPropertyPoolJDBC(java.lang.String fn)
Constructor with input property file
use the fullpath with file name, for example:
"e:\cmbroot\cmbpooljdbc.ini" |
DKPropertyPoolJDBC(java.net.URL fn)
Constructor with input property URL file |
Method Summary |
java.lang.String |
getProperty(java.lang.String key)
Searches for the property with the specified key. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DKPropertyPoolJDBC
public DKPropertyPoolJDBC()
- Constructor without input, use the default property file "cmbpooljdbc.ini"
the "cmbpooljdbc.ini" must be in the current directory of application program
DKPropertyPoolJDBC
public DKPropertyPoolJDBC(java.lang.String fn)
- Constructor with input property file
use the fullpath with file name, for example:
"e:\cmbroot\cmbpooljdbc.ini"
- Parameters:
fn
- the full path property file name
DKPropertyPoolJDBC
public DKPropertyPoolJDBC(java.net.URL fn)
- Constructor with input property URL file
- Parameters:
fn
- the property URL file name
getProperty
public java.lang.String getProperty(java.lang.String key)
throws DKUsageError
- Searches for the property with the specified key.
If the property is not loaded yet, it will load it.
If property file is not found, the default cmbpooljdbc.ini
file will be used. If the cmbpooljdbc.ini is not found
DKUsageError is thrown.
If the key is not found in the property file, the
method returns null.
Parameters:
key - the property key.
Returns:
the value in the property file with the specified key value.
Throws: DKUsageError
if an error occurred when reading the property file
(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.