Data_Access / DatabaseActors
Block Name: DatabaseManager
Code File Location: VisualSim/actor/lib/database/DatabaseManager
A DatabaseManager. When preinitialized, this actor opens a connection to the specified database. When wrapup() is called, it closes the connection. A user of this class can also separately call getConnection() to open a connection, but then that user must also call closeConnection() when finished.
This class polls all available JDBC database drivers until one is willing to open the string given by the database parameter. Depending on the driver, this string may be a URL. Some database drivers are packaged with VisualSim and available from a ModelBuilder process. You can make others available by setting the jdbc.drivers property. For example, when invoking ModelBuilder, do something like this:
export JAVAFLAGS=-Djdbc.drivers=com.mysql.jdbc.Driver:bad.tast.ourDriver
$VS/bin/ModelBuilder -verbose
The above lists two drivers, in order of preference, separated by a ":".
More information can be found at http://java.sun.com/j2se/1.5.0/docs/api/java/sql/DriverManager.html.
Parameter |
Explanation |
Type |
Example |
database |
JDBC connection string to access the database. This always starts with "jdbc:driver", where the specific driver chosen determines how to interpret fields in the rest of the string. For example, |
||
userName |
User name |
Created with the Personal Edition of HelpNDoc: Free PDF documentation generator