Mashups in EMML : Writing Mashups in EMML : Declaring Data Sources : Explicitly Defining the Connection
Explicitly Defining the Connection
Each <datasource> declaration must have one of these two sets of properties:
*A URL that defines the JDBC connection and credential information to log into the database. For example:
<datasource url="jdbc:hsqldb:hsql://localhost:9001"
username="system" password="sa"/>
The form of the url depends on the type of database. Common URL patterns include:
*jdbc:hsqldb:driver-type://hostname:port
*jdbc:mysql://hostname/databasename
Important:  
For MySQL databases, it is recommended that you include the database name in data source URLs. If this information is omitted, you may experience access errors when running or debugging the mashup script.
*jdbc:oracle:driver-type@hostname:port
*jdbc:postgresql://hostname:port/database-name
*jdbc:sqlserver://hostname:port;databaseName=database-name
*jdbc:sybase:Tds:hostname:port
Both the username and password attributes are also required, but password can be empty if no password is required. If security is a concern for datasource credentials included in mashup scripts, define datasources in the Presto Server and use implicit data sources instead.
In most cases, you also must include a driver class to define the JDBC driver to use with the connection. This is optional, but if you omit the driver class, the Presto Server uses the HSQL driver for the default Presto Repository. For example:
<datasource url="jdbc:oracledb:osql://localhost:9001"
driverclassname="oracle.jdbc.driver.OracleDriver"
username="system" password=""/>
*A JNDI name for connections to the database. For example:
<datasource jndiname="java:/comp/env/jdbc/myDatasource" />
The JNDI name must be in the form java:/comp/env/jdbc/jndi-name. No other properties for <datasource> are needed with JNDI connections.
Copyright © 2013-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback