-
1. Re: How to create a new workspace in Modeshape manually
rhauch Feb 4, 2015 10:17 AM (in response to paolo.barberis.73)Be sure that when logging in to get a Session that you specify the name of your workspace.
You can either configure it in the repository configuration; in your case, within the "standalone-modeshape.xml" of your EAP installation, or whatever EAP configuration file you're using. There's already an example in that file:
<repository name="artifacts">
<!-- ... -->
<!-- Define 3 workspaces to exist upon startup -->
<workspaces default-workspace="default" allow-workspace-creation="false">
<workspace name="default">
<initial-content>initial-content-default.xml</initial-content>
</workspace>
<workspace name="other"/>
<workspace name="extra"/>
</workspaces>
<!-- ... -->
<repository name="artifacts">The same is true for Wildfly with ModeShape 4.x.
For those using ModeShape outside of EAP or Wildfly, you can configure this in your JSON repository configuration file. Here's a fragment that does the same thing as the XML fragment above:
"workspaces" : {
"predefined" : ["other", "extra"],
"default" : "default",
"allowCreation" : true,
"initialContent" : {
"default" : "initial-content-default.xml"
}
},And finally, if your configuration allows workspace creation, you can programmatically create workspaces using the standard JCR API.
(I also answered your Stack Overflow question.)
-
2. Re: How to create a new workspace in Modeshape manually
paolo.barberis.73 Feb 4, 2015 12:01 PM (in response to rhauch)Thanks,
I managed to make this work only upgrading the environment to:
JBoss 6.3 EAP and Modeshape 3.8.1