Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Linking to Other Databases

In order to link to tables in another database, you must first tell the application server about that database by adding a datasource descriptor file.

Agiloft only supports external tables with single primary key field which must be of exact numeric type (eg bigint/integ).

See examples of datasource configurations in EW_HOME/jboss/server/sw/deploy/ew-ds.xml as well as JBoss AS Config DataSources. More detailed information is available in Configuring JDBC DataSources document from JBoss AS documentation.

Example for MSSQL: 

<no-tx-datasource>
<jndi-name>DATABASE_NAME</jndi-name>
<min-pool-size>10</min-pool-size>
<max-pool-size>20</max-pool-size>
<blocking-timeout-millis>7500</blocking-timeout-millis>
<idle-timeout-minutes>5</idle-timeout-minutes>
<connection-url>jdbc:sqlserver://SQL_SERVER_HOSTNAME:1433;database=DATABASE_NAME;
SelectMethod=direct;lastupdatecount=true;responseBuffering=adaptive;
lockTimeout=900000;packetSize=512;applicationName=EW</connection-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<user-name>USER_NAME</user-name>
<password>PASSWORD</password>
<type-mapping>MS SQLSERVER2000</type-mapping>
</no-tx-datasource>

To prevent the datasource file from being overwritten on update give it a name matching one of the following patterns:

  • *ewcustom*-ds.xml
  • ew_datasource_*-ds.xml

Example

 ew_datasource_my_external_db_ds.xml or my_db_ewcustom-ds.xml.


Jboss AS picks up the changes to this file immediately, so it is advisable to stop the server process before making changes to this file and start again only after changes are complete.



CONTENTS
  • No labels