Explicitly Defining the Connection
Each <datasource> declaration must have one of these two sets of properties:
A URL that defines the JDBC connection and credentialinformation 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 URLpatterns 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 isrequired. If security is a concern for datasource credentials included inmashup scripts, define datasources in the MashZone NextGen Serverand use implicit data sources instead.
In most cases, you also must include a driver class todefine the JDBC driver to use with the connection. This is optional, but if youomit the driver class, the MashZone NextGen Serveruses the HSQL driver for the default MashZone NextGen Repository. Forexample:
<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.