Connections

DBConnection

Database connections provide connectivity to (relational) databases. They use JDBC drivers for communication. CloverGUI designer provides wizard for definition of database connections. Connection definition may be created shared as well as local. External definition must be linked to the graph before it is available from designer.

Wizard allows the user specify basic connection properties (name, password, URL) and select suitable jdbc driver. Driver may be loaded from external jar file. Advanced connection properties may be specified as name-value pair (click Advanced button and use right click context menu to create new entities). A connection may be configured without having a database accessible. In case database is accessible, user can verify connection validity and check for possible configuration errors.

External connection configuration will be stored in java property java format.

Tip: When a JDBC driver is loaded into wizard its connection is saved and need not be loaded again when the wizard is restarted.

Xml attributes:

Attribute Mandatory Description Default Etl version from
id yes component identification
type yes component type JDBC
dbConfig no filename of the config file from which to take connection parameters. If used, then all other attributes are ignored.
dbURL yes in no dbConfig URL of the database (aka connection string)
dbDriver yes in no dbConfig name of the JDBC driver
driverLibrary no name(s) (full path) of Java library file(s) (.jar,.zip,…) where to search for class containing JDBC driver specified in dbDriver parameter. In case of more libraries, use system path separator to delimit them (e.g. ”;”).
database no database type - used to lookup in built-in JDBC drivers. At this moment, two built-in drivers are contained in CloverETL (for PostgreSQL and MySQL databases), for this reason, database can have one of the following values: POSTGRE or MYSQL.
user no username to use when connecting to DB
password no password to use when connecting to DB
transactionIsolation no Allows specifying certain transaction isolation level. Following are the valid options: 0 (TRANSACTION_NONE), 1 (READ_UNCOMMITTED), 2 (READ_COMMITTED), 4 (REPEATABLE_READ), 8 (SERIALIZABLE). For more information see java.sql.Connection class. 2.6.1
holdability no Allows specifying holdability of ResultSet objects created using this Connection. Following are the valid options: 1 (HOLD_CURSORS), 2 (CLOSE_CURSORS). For more information see java.sql.ResultSet class. CLOSE_CURSORS 2.6.1
sqlQuery no it is used for metadata generation
threadSafeConnection no if set, each thread gets its own connection. Can be used to prevent problems when multiple components conversate with DB through the same connection object which is not thread safe. true
passwordEncrypted no decrypts the password entry in the configuration properties if the passwordEncrypted property is set to “true”. false


Example of database connection:

  <Connection name="Conn" 
              id="Connection1"
              type="JDBC"
              dbDriver="sun.jdbc.odbc.JdbcOdbcDriver" 
              dbURL="jdbc:oracle:thin:@//localhost:1521/mytestdb" 
              user="admin"
              password="admin"/>
 
  <Connection dbConfig="oracle.cfg" id="Connection1" type="JDBC"/>
 
  <!-- oracle.cfg file -->
  dbDriver=oracle.jdbc.driver.OracleDriver
  dbURL=jdbc:oracle:thin:@//localhost:1521/mytestdb
  user=noname
  password=free
  defaultRowPrefetch=10
  driverLibrary=c:/Orahome91/jdbc/lib/ojdbc14.jar

Connection definition dialog:




JmsConnection

Xml attributes:

Attribute Mandatory Description Default
id yes component identification
type yes component type JMS
config no filename of the config file from which to take connection parameters. If used, then all other attributes are ignored.
iniCtxFactory yes if no config constant that holds the name of the environment property for specifying the initial context factory to use. The value of the property should be the fully qualified class name of the factory class that will create an initial context.
providerUrl yes if no config constant that holds the name of the environment property for specifying configuration information for the service provider to use. The value of the property should contain a URL string (e.g. "ldap://somehost:389").
connectionFactory yes if no config factory creating JMS connections (class name of a factory which implements javax.jms.ConnectionFactory interface)
destId yes if no config JMS destination (class name of a destination which implements javax.jms.Destination interface)
username no username for connection factory
password no password for connection factory


Example of JMS connection:

  <Connection id="dest"
              type="JMS"
              iniCtxFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory"
              providerUrl="vm://localhost"
              connectionFactory="ConnectionFactory"
              destId="dynamicQueues/Clover"/>
 
  <Connection id="dest"
              type="JMS"
              config="jms.cfg"/>
 
  <!-- jms.cfg file -->
  iniCtxFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory
  providerUrl=vm://localhost
  connectionFactory=ConnectionFactory
  destId=dynamicQueues/Clover

JMS Connection definition dialog:




graph_elements/connections.txt · Last modified: 2009/09/16 12:27 (external edit)
Back to top
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0