This proxy provides exchange rates for the Sales module.
It uses a webservice of the European Central Bank, which is free to use.
As of version 1.0.3, the exchange rates are stored in a database instead of fetching the data during deployment.
Prior to 1.0.3, the proxy would return exactly what the European Central Bank returned:
Now, the proxy returns the last known exchange rate:
<dependency> <groupId>eu.europa.ec.fisheries.uvms.sales</groupId> <artifactId>sales-proxy-ecb</artifactId> <version>LATEST</version> </dependency> |
Name | JNDI name | Description |
---|---|---|
UVMSSalesEcbProxy | java:/jms/queue/UVMSSalesEcbProxy | Request queue to the Sales ECB Proxy |
UVMSSalesEcbProxyConfig | java:/jms/queue/UVMSSalesEcbProxyConfig | Queue to sync with config |
<admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:/jms/queue/UVMSSalesEcbProxy" use-java-context="true" pool-name="UVMSSalesEcbProxy"> <config-property name="PhysicalName"> UVMSSalesEcbProxy </config-property> </admin-object> <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:/jms/queue/UVMSSalesEcbProxyConfig" use-java-context="true" pool-name="UVMSSalesEcbProxyConfig"> <config-property name="PhysicalName"> UVMSSalesEcbProxyConfig </config-property> </admin-object> |
Module dependencies
Make sure the following modules have also been deployed.
Name | Repository |
---|---|
Sales | Sales |
Name | JNDI name |
---|---|
uvms_salesecbproxy |
<datasource jta="true" jndi-name="java:/jdbc/uvms_salesecbproxy" pool-name="uvms_salesecbproxy" enabled="true" use-ccm="true"> <connection-url>jdbc:postgresql://dbunid02/duvms?defaultSchema=salesecbproxy</connection-url> <driver-class>org.postgresql.Driver</driver-class> <driver>postgresql</driver> <security> <user-name>salesecbproxy</user-name> <password>salesecbproxy</password> </security> </datasource> |
The sales ecb proxy lets you free in choosing the schema name.
On the other side, this also means that the schema name is not included in queries, so make sure that the schema is on the user's search path.
When you use the default ECB webservice, make sure to whitelist: http://sdw-wsrest.ecb.europa.eu/service/data/EXR/D..EUR.SP00.A