Skip to content

Instantly share code, notes, and snippets.

@dnno
Created December 14, 2017 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dnno/82e70bc141235a9d6b923af1a5c24bd1 to your computer and use it in GitHub Desktop.
Save dnno/82e70bc141235a9d6b923af1a5c24bd1 to your computer and use it in GitHub Desktop.
public InfinispanContainer configurationFile(final String classPathResourceName) {
URL resourceUrl = this.getClass().getClassLoader().getResource(classPathResourceName);
if (resourceUrl == null) {
throw new IllegalArgumentException("Cannot read configuration resource");
}
return withFileSystemBind(new File(resourceUrl.getFile()).getAbsolutePath(),
"/opt/jboss/infinispan-server/standalone/configuration/standalone.xml",
BindMode.READ_ONLY);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment