-
1. Re: ExternalContext Problem
jbriscoe Feb 13, 2004 7:54 AM (in response to jbriscoe)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