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 | Named Datasources versus the Default Datasource
 
Named Datasources versus the Default Datasource
Implicit datasources are named when they are configured in the MashZone NextGen Server. You use this name in SQL statements in mashup scripts to identify which datasource to apply the SQL statements to.
Explicit datasources can also have a name that you can use in SQL statements to identify which datasource to apply the SQL statements to. Named datasources:
*Provide better performance because the MashZone NextGen Server caches named connections.
Because of this caching, datasource names for each connection must be unique and consistent across all mashups published in one MashZone NextGen Server.
*Allow you to work with multiple datasources in one mashup script.
If the name is omitted in the <datasource> declaration, the datasource is considered a default datasource. SQL statements without a datasource name are applied to the default datasource.
In this example, the datasource on the localhost is treated as the default datasource. Two additional explicit datasources, named HR and Finance are declared:
<datasource url="jdbc:oracledb:osql://localhost:1521"
driverclassname="oracle.jdbc.driver.OracleDriver"
username="system" password=""/>
<datasource url="jdbc:oracledb:osql://234.10.25.2:1521"
driverclassname="oracle.jdbc.driver.OracleDriver"
name="Finance" username="system" password=""/>
<datasource url="jdbc:oracledb:osql://234.10.35.2:1521"
driverclassname="oracle.jdbc.driver.OracleDriver"
name="HR" username="system" password=""/>

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