Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034147Retail ModulesStoreServerpublic2016-09-30 13:262016-10-31 20:17
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
 
mtaal
No
0034147: Simplify the creation of the symmetric-ds.properties file in the central server.
The creation of the symmetric-ds.properties file in a store server is transparent for the users. The file is automatically created when Tomcat is started.

In the central server, the file is created when the install.symmetric.ds task is invoked, but only if the file did not exist already. If it exists, it is reused. This can lead to ugly problems if the contents of the existing file are not proper (i.e. because it was cloned from another central server and it contains wrong URLs and database access properties).

We decided to do this to allow the users to overwrite some SymmetricDS properties by adding/modifying the content of the properties file. We could achieve the same by creating a table where users can persist custom values for the SymmetricDS properties they want to overwrite.
-
No tags attached.
Issue History
2016-09-30 13:26AugustoMauchNew Issue
2016-09-30 13:26AugustoMauchAssigned To => AugustoMauch
2016-09-30 13:26AugustoMauchTriggers an Emergency Pack => No
2016-10-11 16:21hgbotCheckin
2016-10-11 16:21hgbotNote Added: 0090536
2016-10-11 16:21hgbotCheckin
2016-10-11 16:21hgbotNote Added: 0090537
2016-10-11 16:21hgbotStatusnew => resolved
2016-10-11 16:21hgbotResolutionopen => fixed
2016-10-11 16:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/fbfd4047cc5b7838724c674f2d2c6130fdebe771 [^]
2016-10-24 00:43mtaalReview Assigned To => mtaal
2016-10-24 15:14mtaalNote Added: 0090820
2016-10-24 15:14mtaalStatusresolved => new
2016-10-24 15:14mtaalResolutionfixed => open
2016-10-24 15:39mtaalNote Edited: 0090820bug_revision_view_page.php?bugnote_id=0090820#r13459
2016-10-24 18:49hgbotCheckin
2016-10-24 18:49hgbotNote Added: 0090828
2016-10-24 18:49hgbotStatusnew => resolved
2016-10-24 18:49hgbotResolutionopen => fixed
2016-10-24 18:49hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/fbfd4047cc5b7838724c674f2d2c6130fdebe771 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/fa1155a3635ec5852cc715dc6692bab611647026 [^]
2016-10-31 20:17mtaalNote Added: 0091027
2016-10-31 20:17mtaalStatusresolved => closed

Notes
(0090536)
hgbot   
2016-10-11 16:21   
Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: 345ddf5df991c64030b09b3fa1f24e839f050320
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Oct 11 11:02:44 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/345ddf5df991c64030b09b3fa1f24e839f050320 [^]

Related with issue 34147: Adds the STRSYNC_SYNC_PARAMS table and window

The STRSYNC_SYNC_PARAMS table will store custom init values for some SymmetricDS properties. The properties defined in that table will be used to create the symmetric-ds.properties file, they will be appen
ded to the list of properties that are generated automatically (database info, name and group of the node, URLs, etc).

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MENU.xml
M src-db/database/sourcedata/AD_REFERENCE.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
M src-db/database/sourcedata/AD_TAB.xml
M src-db/database/sourcedata/AD_TABLE.xml
M src-db/database/sourcedata/AD_TREENODE.xml
M src-db/database/sourcedata/AD_WINDOW.xml
A src-db/database/model/tables/STRSYNC_SYNC_PARAMS.xml
---
(0090537)
hgbot   
2016-10-11 16:21   
Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: fbfd4047cc5b7838724c674f2d2c6130fdebe771
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Oct 11 12:50:10 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/fbfd4047cc5b7838724c674f2d2c6130fdebe771 [^]

Fixes issue 34147: Handling of SymmetricDS config file has been simplified

The SymmetricDS properties file used to be reused in the central server to allow users to write in it some custom init values for synchronization properties. This was useful for this purpose, but was dange
rous if the reused properties file has some of not-customizable parameters (URLs, database parameters, server name, etc) not updated.

To simplify this, now the SymmetricDS properties is always generated on the fly, both for the central and the store server. Users can now provide custom init values for some synchronization parameters usin
g the Default Synchronization Parameters window.

---
M src/org/openbravo/replication/symmetricds/SetupSymmetricListener.java
M src/org/openbravo/replication/symmetricds/process/CreateEnginePropertiesComponent.java
M src/org/openbravo/replication/symmetricds/task/CreateSynchronizationPropertiesIfNeededTask.java
M src/org/openbravo/replication/symmetricds/templates/engine-properties.ftl
M src/org/openbravo/replication/symmetricds/util/SynchronizationPropertiesFileBuilder.java
---
(0090820)
mtaal   
2016-10-24 15:14   
(edited on: 2016-10-24 15:39)
Reviewed, some remarks as discussed:
- the synchronization parameters window should be available for the system admin role, not client/org
- the default synchronization parameters parameter name field is now a list reference, maybe better to make a free edit field.
- also add a module column and make it exportable as part of a module.

The value could potentially be validated using an persistence event listener and compare with the existing list of properties of symmetric ds (see the synchronization properties datasource). Although this assumes that the symmetric ds engine has been installed and is available.

(0090828)
hgbot   
2016-10-24 18:49   
Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: fa1155a3635ec5852cc715dc6692bab611647026
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Oct 24 18:47:57 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/fa1155a3635ec5852cc715dc6692bab611647026 [^]

Fixes issue 34147: Applies code review

The three points raised in the code review have been addressed:
- The Default Synchronization Parameters window is now available for the System Admin role
- The entries of STRSYNC_SYNC_PARAMS can be exported to a module
- The parameter name is now a plain text field. An event handler has been created to check if the parameter name is a valid SymmetricDS parameter. This check is only done if SymmetricDS
 is currently installed in the server.

---
M src-db/database/model/tables/STRSYNC_SYNC_PARAMS.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_DATASET_TABLE.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/AD_TABLE.xml
A src/org/openbravo/replication/symmetricds/eventhandler/SymmetricDsPropertyCheckerEventHandler.java
---
(0091027)
mtaal   
2016-10-31 20:17   
Reviewed and tested