JDBC Connection Configuration |
![]() ![]() ![]() |
jdbcConnection element is used to define a JDBC connection in a global configuration file
The name attribute of the element must be a unique name in its type in the whole configuration. Nested Elements jndids (Accepts MScript) If your J2EE environment is configured to provide JDNI data sources, then you can give the name of a JNDI data source name in this element and ignore driver and dburl elements. If you define both this element and driver, dburl elements and try to obtain a connection through org.moremotion.util.JdbcConnection class then MoreMotion will first try to get a connection using the JDNI data source name; If it fails it will try to get the connection from the Driver Manager using the values of driver and dburl elements. driver (Accepts MScript) Specify the name of the JDBC driver class provided for the type of the data base you want to connect with this element. There are native JDBC drivers available for the most of the popular data base systems. In case there is no native JDBC driver for your data base then you can use JDBC/ODBC bridge from sun.jdbc.odbc.JdbcOdbcDriver class which is shipped with MoreMotion. The jar file of the JDBC driver should be provided in the {APPLICATION_ROOT}/WEB-INF/lib directory. dburl (Accepts MScript) This element defines the data base connection url string. user (Accepts MScript) The name of a data base user with a sufficient authority. password (Accepts MScript) The password of the data base user. autoCommit (Accepts MScript) Flag to set auto commit to on (true) of off (false) firstSQL (Accepts MScript) The first SQL statement to be executed as soon as the connection is established. lastSQL (Accepts MScript) The last SQL statement to be executed before the connection is closed. |