Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
3 participants
@snicoll
Copy link
Contributor

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

This comment has been minimized.

Copy link
Collaborator

commented Aug 26, 2015

@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

This comment has been minimized.

Copy link
Contributor Author

commented Aug 26, 2015

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

@snicoll

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Contributor Author

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 added a commit to mesutcelik/hazelcast that referenced this issue Aug 28, 2015

@mesutcelik mesutcelik added this to the 3.6 milestone Aug 28, 2015

mesutcelik added a commit to mesutcelik/hazelcast that referenced this issue Aug 31, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.