-
1. Re: Cannot see external context in JNDI namespace
gtilitzky Nov 8, 2002 11:42 AM (in response to javid)
external/ldap/eDir
eDir.properties
javax.naming.ldap.InitialLdapContext
true
jboss:service=Naming
This worked for me. I have the properties file in the same directory as the jboss-service.xml. -
2. Re: Cannot see external context in JNDI namespace
javid Nov 11, 2002 11:03 AM (in response to javid)Thanks a lot. It did work for me too. I wasn't aware of these extra attributes.
javi -
3. Re: Cannot see external context in JNDI namespace
javid Nov 11, 2002 11:05 AM (in response to javid)Thanks a lot. It did work for me too. I wasn't aware of these extra attributes.
javi -
4. Re: Cannot see external context in JNDI namespace
jbriscoe Feb 11, 2004 3:47 PM (in response to javid)I am trying to load a directory's contents into JNDI, not an LDAP directory.
I'm using JBoss 3.2.2RC3
My jboss-service.xml file looks like this:
---- Begin $JBOSS_HOME/server/default/deploy/jboss-service.xmlmbean code="org.jboss.naming.ExternalContext" name="DefaultDomain:service=ExternalContext,jndiName=external/fs/TEMP" attribute name="JndiName" external/fs/TEMP attribute name="Properties" jacob_fs.properties attribute name="Properties" jacob_fs.properties attribute name="InitialContext" javax.naming.InitialContext
---- End $JBOSS_HOME/server/default/deploy/jboss-service.xml
My properties file looks like this:
---- Begin $JBOSS_HOME/server/default/conf/jacob_fs.propertiesjava.naming.factory.initial=com.sun.jndi.fscontext.FSContextFactory java.naming.provider.url=file:C:\TEMP
---- End $JBOSS_HOME/server/default/conf/jacob_fs.properties
JBoss loads without any problems, it binds the name "external/fs/TEMP". What it does not do is recursively map the file "TEMP"'s contents, which is what I need to do.
I've read several posts on this forum and the JBoss 2.4+ External JNDI and JNDI Viewing Docs and none have been completely helpfull. If somebody could please tell me what I'm doing wrong that would be greatly appreciated.
Thanks in advance,
Jacob -
5. Re: Cannot see external context in JNDI namespace
jbriscoe Feb 13, 2004 7:54 AM (in response to javid)After fighting with mounting a file system in JNDI with JBoss 3.2.2 I have finally solved the problem!
I was going about some things in the wrong way first off, I needed a SAR file for the new fs external context that I was creating. The SAR's layout looks like this...
$JBOSS_HOME/server/default/deploy/external-fs.sar
/fscontext.jar
/providerutil.jar
/META-INF
/META-INF/MANIFEST.MF
/META-INF/jboss-service.xml
That was my first problem that I solved, I was originally placing the jboss-service just in the deploy directory and putting the fscontext.jar & providerutil.jar in the server's lib directory.
The second problem was the content of the jboss-service.xml file. This is what my WORKING jboss-service.xml file looks like.
mbean code="org.jboss.naming.ExternalContext" name="jboss:service=ExternalContext,jndiName=external/fs"
attribute name="JndiName" external/fs
attribute name="Properties" java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
java.naming.provider.url=file:///TEMP
attribute name="InitialContext"
javax.naming.InitialContext
attribute name="RemoteAccess" false
-- End of File...
No documentation that I could find on this subject says that the properties attribute may be of actual Property type.
So all of that is working now. I deployed the .sar and everything works as planned.
I hope this helps somebody.
Jacob