View Issue Details

IDProjectCategoryView StatusLast Update
0003412SymmetricDSImprovementpublic2019-04-24 17:26
Reportervibhorejairath Assigned To 
Priorityhigh 
Status newResolutionopen 
Product Version3.8.33 
Summary0003412: SymmetricDS needs sql script to insert REGISTRATION_REDIRECT entry whereas registration service must handle it.
DescriptionHello Support Team,

We are using multi-tiered deployment at our various customers and to overcome the problem of manually inserting records in sym_registration_redirect table, we have customized RegistrationService.java to do it for us programmatically. Is it possible we can get this feature in the base product so that we can get rid of our customization and can do smooth upgradation without worrying about our customization.Also if you can provide the extension-point for RegistrationService then that will suffice our requirement as well.

Our multi-tiered deployment looks like this Central --> Store--> POS. Therefore in the below code we are checking if the groupId is Store then we call saveRegistraionRedirect to save it in the aforementioned table.

 // Start Registration Redirect Update
    public static final String REGISTER_SUFFIX = "00000";
    public static final String TIER_2_GROUP = "store";
    public static final String TIER_3_GROUP = "pos";

    protected String getRedirectionUrlFor(String externalId, String groupId) {
        String redirectUrl = null;
        String nodeStoreId = StringUtils.substring(externalId, 0, 5);

        if (StringUtils.equalsIgnoreCase(TIER_2_GROUP, groupId)) { // is store node
            String redirectId = nodeStoreId + REGISTER_SUFFIX;
            saveRegistrationRedirect(redirectId, externalId);
        } else if (StringUtils.equalsIgnoreCase(TIER_3_GROUP, groupId)) { // is pos node
            String redirectId = nodeStoreId + REGISTER_SUFFIX;
            redirectUrl = getRedirectionUrlFor(redirectId);

            if (StringUtils.isBlank(redirectUrl)) {
                log.warn("Store node for " + nodeStoreId + " must be registered and loaded before POS node "
                        + externalId);
            }
        }
        return redirectUrl;
    }
    // End Registration Redirect Update


I am attaching source file for your reference. Please look for getRedirectionUrlFor method in the attached file.

We also need a extension point to support substring on external_id . The reason for that is One Store can have multiple POS systems and in order to make the node ids unique for all POS terminal, we suffix StoreID with TerminalID. For eg Store ID = 09124 and Terminal ID =001. the externalId for POS node will become 09124001. However, in our database we store data based on storeId and hence we need to use substring method.
Steps To ReproduceCreate a multi-tiered deployment as described above and start the Central, Store and POS nodes.
Tagsregistration

Activities

vibhorejairath

2018-02-08 23:13

reporter  

RegistrationService.java (38,403 bytes)

Issue History

Date Modified Username Field Change
2018-02-08 23:13 vibhorejairath New Issue
2018-02-08 23:13 vibhorejairath File Added: RegistrationService.java
2018-02-08 23:13 vibhorejairath Tag Attached: Upgrade
2019-04-24 17:26 elong Tag Detached: upgrade
2019-04-24 17:26 elong Tag Attached: registration