PriDE Configuration
PriDE's basic configuration mechanism is the interface
ResourceAccessor. It defines details of an application's database
access strategy as explained in the introduction.
Although every application may provide its own individual
implementation, it is often sufficient to use the predefined ones
delivered with PriDE. The classes ResourceAccessorJ2SE,
ResourceAccessorWeb
and ResourceAccessorJ2EE
provide different implementations for managed and unmanaged Java
environments. All classes are derived from AbstractResourceAccessor
which can be configured by the properties listed below. The
configuration parameters can be defined as system properties or passed
in the constructor of the resource accessor.
- pride.dbtype
Defines the type of database to be accessed. PriDE was tested with
various different database systems and provides appropriate type
constants in ResourceAccessor.DBType.
- pride.format.date
Specifies the SQL format to be used for writing java.util.Date and
java.sql.Timestamp values to the database. PriDE already provides
suitable formatting depending on the database type specified by
property pride.dbtype. For unknown database types, PriDE uses the
toString method.
- pride.format.time
Like pride.format.date but for java.sql.Date.
- pride.logfile
Name of the file to report all executed SQL statements to. If no
logfile is specified, logging is omitted.
- pride.logmax
Specifies the maximum number of SQL statements being reported to a log
file before the file is rewritten from the start.
- pride.user
User name to be used when fetching connections from Java's
DriverManager. This property only makes sense in a J2SE environment.
Managed environments usually provide connections through managed
DataSources which have a user name already associated with the
underlying connection pool.
- pride.password
Password to be used when fetching connections from Java's
DriverManager. This property only makes sense in a J2SE environment.
- pride.driver
Driver class to be loaded into the DriverManager to fetch connections
from. This property only makes sense in a J2SE environment.
- pride.systime
Specifies a time in milliseconds since 1.1.1970 which is used as an
indicator for the current system time. When writing this value to the
database, it is replaced by a vendor-specific indentifier like
"SYSDATE" for Oracle databases or "CURRENT_TIMESTAMP" for Microsoft SQL
Server. By default, this value is 01.01.0001 00:00:01.