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

Path to modeshape config #30

Merged
merged 2 commits into from Mar 7, 2013
Merged

Path to modeshape config #30

merged 2 commits into from Mar 7, 2013

Conversation

cbeer
Copy link
Contributor

@cbeer cbeer commented Mar 7, 2013

https://www.pivotaltracker.com/story/show/45628561

The current, default configs are wrapped up in the WEB-INF and are not particularly friendly to deal with. Do we need a fedora.home variable to go hunting for configs?

We know this is done when, as a repository administrator (of the demo repository, at least), I can configure where the fcrepo data is persisted (aka outside of the ./target).

@cbeer
Copy link
Contributor Author

cbeer commented Mar 7, 2013

@ajs6f can you take a look at this?

@ajs6f
Copy link
Contributor

ajs6f commented Mar 7, 2013

If you look at how the config is used by ModeShape's factory, it's as an URL (it's passed as an URL). Why not make the config field an URL and not a (Spring-specific) Resource?

@cbeer
Copy link
Contributor Author

cbeer commented Mar 7, 2013

Will that work for both files and classpaths? I assumed spring was doing something clever, but maybe it's a java thing?

@ajs6f
Copy link
Contributor

ajs6f commented Mar 7, 2013

The ModeShapeRepositoryFactoryBean code:

@PostConstruct
public void buildRepository() throws RepositoryException, IOException {
repository = (JcrRepository) jcrRepositoryFactory
.getRepository(Collections.singletonMap(RepositoryFactory.URL,
repositoryConfiguration.getURL()));
}
shows what's happening: the Spring Resource repositoryConfiguration is only being handled by it's URL. (We're not inspecting anything inside that Resource.) If we want (which we do) to be able to use classpath or filesystem (or, for clustering purposes, perhaps HTTP) URLs, that's a separate concern, I think. Using a Spring Resource to create that URL definitely buys us the classpath URL protocol, but I think that there are better (i.e. not Spring-bound) ways to do that (e.g. this.getClass().getResource()).

cbeer added a commit that referenced this pull request Mar 7, 2013
Allow the path to the modeshape config to be passed in as a property (either classpath or filepath.
@cbeer cbeer merged commit 3f523f6 into master Mar 7, 2013
@cbeer cbeer deleted the path-to-modeshape-config branch March 7, 2013 15:50
dbernstein pushed a commit that referenced this pull request Nov 16, 2022
Co-authored-by: Peter Winckles <peter.winckles@wisc.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants