XmlBuilder does not set URL in the config it parses #6061

Closed
snicoll opened this Issue Aug 26, 2015 · 4 comments

Projects

None yet

3 participants

@snicoll
Contributor
snicoll commented Aug 26, 2015

I am integrating Hazelcast in Spring Boot and I found what I think is an inconsistency. If I create the HazelcastInstance with the default newHazelcastInstance static method then I get an HazelcastInstance whose Config has a valid configurationUrl property.

However, the following code gives me a null configurationUrl:

Config cfg = new XmlConfigBuilder(url).build();

Looking at XmlConfigBuilder it doesn't do anything with the parameter (except initializing the input stream). How about specifying the configurationUrl as well?

@bilalyasar
Collaborator

@snicoll, seems this is small bug.
If i understand correctly, you can use this as a workaround:

Config cfg = new XmlConfigBuilder(url).build();
cfg.setConfigurationUrl(url);
@snicoll
Contributor
snicoll commented Aug 26, 2015

I'd rather put it in the "inconsistency" bucket indeed 😄

@snicoll
Contributor
snicoll commented Aug 26, 2015

Note that I am checking on my end if the url points to a file or not (calling the appropriate configurationUrl or configurationFile). If you fix this, then both attributes may be set if our url points to a file. I guess that won't be a problem, right?

@snicoll
Contributor
snicoll commented Aug 26, 2015

You have the same inconsistency if you load via the hazelcast.config system property (i.e. a file or URL to classpath is specified but does not show up in the Config).

@mesutcelik mesutcelik added a commit to mesutcelik/hazelcast that referenced this issue Aug 28, 2015
@mesutcelik mesutcelik configurationURL inconsistencies fixed,closes #6061 9f61e86
@mesutcelik mesutcelik added this to the 3.6 milestone Aug 28, 2015
@pveentjer pveentjer closed this in #6077 Aug 31, 2015
@mesutcelik mesutcelik added a commit to mesutcelik/hazelcast that referenced this issue Aug 31, 2015
@mesutcelik mesutcelik configurationURL inconsistencies fixed,closes #6061 5e18f9e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment