You can connect to external databases by defining additional data source, and use these datasources by adding a <Data Source> trigger to the relevant database plugin, or specifying it via the dataSource property of the Database Record structure.
In the Navigator view, create a file called "Configuration.xml" with the following content:
<Application name="[Project Name]" rootSystem="[Project Name]/[Project Name]">
<DataSource name="[Data Source Name]" driverClassName="[JDBC Driver Class]" username="[DB User]" password="[DB Password]" url="[DB URL]" validationQuery="[DB Validation Query]" />
</Application>
Replacingthe terms in brackets with the appropriate values.
[Data Source Name] is the logical name you will use for the external database
[DB Validation Query] is an optional parameter that should contain a select statement that should succeed if the connection is OK.
To the applications context file, right after the main data source (jdbc/Main) definition, add an additional data source definition like the following:
<Resource name="[Data Source Name]" driverClassName="[JDBC Driver Class]" maxActive="20" maxIdle="10" maxWait="10000"
type="javax.sql.DataSource" username="[DB Username]" password="[DB Password]"
url="[DB URL]" validationQuery="[DB Validation Query]"/>
All database plugins are capable of using an external data source. To do so, add a trigger called <Data Source> and supply it with the value selected to [Data Source Name] in the configuation files.
To use the full functionality of this web site, JavaScript needs to be turned on.
For best results, use the Firefox browser..
Copyright © 2003-2017 - Tersus Software Ltd., All rights reserved. Terms of Use License Graphic design by EmaraDesign