Project

General

Profile

Too long resource

Hic cup
Added over 2 years ago

hi!guys.

My client login and resource create by server.

In BindResource.java Mothed init(Map settings)

resourceDefPrefix = hostnameHash + "-" + resourceDefPrefix;

when comp(eg:http) add,edit and remove via web console,this mothed will be called, and resourceDefPrefix longer (eg:100@domain/1752483901-1752483901-1752483901-1752483901-tigase-279)


Replies (3)

Added by Wojciech Kapcia TigaseTeam over 2 years ago

Hic cup wrote:

when comp(eg:http) add,edit and remove via web console,this mothed will be called, and resourceDefPrefix longer (eg:100@domain/1752483901-1752483901-1752483901-1752483901-tigase-279)

Can you rephrase it to make it more clear? Ideally with steps to reproduce and both expected result and (what you consider) wrong result?

Added by Hic cup over 2 years ago

sorry for reply so late!

Meothed init(Map settings) in BindResource.java called when component added or removed via web console(xx:8090/ui/, "Manage active server components"),

    @Override
    public void init(Map<String, Object> settings) throws TigaseDBException {

        int hostnameHash = Math.abs( DNSResolver.getDefaultHostname().hashCode() );

        // Init plugin configuration
        if (settings.get(DEF_RESOURCE_PREFIX_PROP_KEY) != null) {
            resourceDefPrefix = hostnameHash + "-" + settings.get(DEF_RESOURCE_PREFIX_PROP_KEY).toString();
        } else {
            resourceDefPrefix = hostnameHash + "-" + resourceDefPrefix;
        }
    }

resourceDefPrefix accumulate every time when comp changed , It makes resource longer.

Added by Wojciech Kapcia TigaseTeam over 2 years ago

Thank you, I've commit a fix to the repository.

    (1-3/3)