-
1. Re: Why I can't register a repository in JNDI with a name like java:global/myrepo
rhauch Jun 29, 2012 8:59 AM (in response to emiste)I assume that you're attempting to register the repository within the repository configuration (e.g., the "jndi-name" attribute in the "repository" element in a configuration file, such as "standalone-modeshape.xml"). IIUC, you can't use "java:app/myrepo" because ModeShape's subsystem (which is running in the heart of AS7, outside of any application scope) cannot register something into JNDI using an applications scope (as there is none). However, "java:global/myrepo" works, because the subsystem certainly has access to the global JNDI namespace. See the AS7 JNDI Reference for background.
-
2. Re: Why I can't register a repository in JNDI with a name like java:global/myrepo
emiste Jun 29, 2012 11:02 AM (in response to rhauch)Actually my case is different I started a repository within an EJB using this configuration :
{
"name" : "repo",
"jndiName" : "java:global/repo",
"workspaces" : {
"predefined" : ["otherWorkspace"],
"default" : "default",
"allowCreation" : true
},
"security" : {
"anonymous" : {
"roles" : ["readonly","readwrite","admin"],
"useOnFailedLogin" : false
}
}
}
I did the test another time and I found that is working and I can actually register the repository using java:global/myrepo name . I think I did something wrong in my first test .
Best regards
-
3. Re: Why I can't register a repository in JNDI with a name like java:global/myrepo
rhauch Jun 29, 2012 11:04 AM (in response to emiste)Ah, registering a repository within an EJB should work, and I'm glad it does.