You should be able to add this to your configuration file inside the mode:repository tag for your JCR repository, assuming that acme.cnd is located in some location where it is accessible with a resource path of "/acme.cnd". If this doesn't work for you, please post your config file so that we can try it out.
Import the custom node types defined in the named resource (a file at a classpath-relative
path). If there was more than one file with custom node types, we could either add successive
<jcr:nodeTypes ... /> elements or just add all of the files as a comma-delimited string in the
<jcr:nodeTypes mode:resource="/acme.cnd" />
That was pretty much my (newbie) quuestion: in which folder would Modeshape (JBOSS-AS) look into if I specify "/acme.cnd"?
Actually, now that I look at it, 'Shape will first treat the path as a resource path. If it can't find anything at that resource path, it will try to load a file from that file path. If that doesn't work either, it will throw an exception. Sorry for the half-answer before.
OK - and what (file-)path would it look for?
Say my JBOSS-AS is located at "/servers/jbossas/server/default/" and Modeshape's "modeshape-config.xml" resists inside "/server/default/deploy/modeshape-services.jar/". If I now have the "<jcr:nodeTypes mode:resource="/acme.cnd" />" in this config file - in which directory should I place the "acme.cnd" file?
Since you're deploying ModeShape as a JAR, you have to either have acme.cnd in a directory that's on the classpath either implicitly (like /server/default/conf) or explicitly (like some directory you put into your JBOSS_CLASSPATH environment variable before starting up the server).
Alternatively, you could treat "/acme.cnd" as a file path and put it in the root directory of your filesystem, but there are some obvious flaws with that deployment mechanism.
If it were me and I wanted to externalize 'Shape from any particular webapp or service running on the app server, I would probably make a modeshape directory under /server/default/conf and stick my CND files in there. That way I could patch versions of modeshape-services.jar without overwriting my custom node types.
People who spend more time administering JBoss may be able to find flaws with that approach though.
Alright - that was the missing piece... I thought the path would be relative to something.
Thanks Brian for making it clear =)