Integrate Software AG Products Using Digital Event Services 10.4 | Integrate Software AG Products Using Digital Event Services | MashZone NextGen Help | Appendix | Legacy Presto components | Mashables and Mashups | Mashups in EMML | Writing Mashups in EMML | Declaring Data Sources | <datasource>
 
<datasource>
Optional element to explicitly declare the connection information to a database. Connection configuration can be specified as a JDBC connection or using JNDI. This connection information is used to directly execute SQL commands.
Tip: In most cases, you do not need to declare datasources for SQL Statements in mashups. Instead, identify the datasource using the names assigned to datasources that have already been configured in the MashZone NextGen Server. See Declaring Data Sources for more information.
You can declare any number of named datasources in a mashup script. EMML statements can also refer to implicit datasources that have been configured in the MashZone NextGen Server and are not declared in the mashup script. You can declare and use a single, unnamed datasource that is considered the default. EMML statements that execute SQL commands and do not have a datasource name use the default datasource.
Datasource names must be unique within a given MashZone NextGen Server. Connection information for a given datasource name must be identical as connections for named data sources are cached. Caching is not used for default datasource connections.
See also Declaring Data Sources for more information and examples.
Can Contain
Empty
Allowed In
mashup | catch | else | elseif | for | foreach | if | macro | operation | sequence | try | while
Attributes
Name
Required
Description
name
Optional name for this datasource. If omitted, this becomes the default datasource for EMML SQL statements that do not define a datasource.
url
The URL for a JDBC connection to this datasource in the form jdbc:name:protocol://host:port. If omitted, you must specify connection information for this datasource in the jndiname attribute.
driverClassName
The class name of the driver for a JDBC connection to this datasource. This is only relevant if url is specified. If omitted, this defaults to the HSQLDB JDBC driver class.
username
The user name for the JDBC connection to this datasource. This is required for JDBC connections (in url), but is not relevant for JNDI connections.
Note: If security for datasource credentials in mashup scripts is a concern, configure datasources in the MashZone NextGen Server instead and use implicit datasources in mashup scripts.
password
The password to log into this datasource with. This is required, but can be empty, for JDBC connections (in url). It is not relevant for JNDI connections.
Note: If security for datasource credentials in mashup scripts is a concern, configure datasources in the MashZone NextGen Server instead and use implicit datasources in mashup scripts.
jndiname
The JDNI name for this datasource, in the form java:/comp/env/jdbc/jndi-name. If omitted, you must specify JDBC connection information in the url and related attributes.

Copyright © 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release