On another server, in a standalone Tomcat server, I locate a properties file using a JNDI lookup by adding the following entry in my server.xml file.
<!-- Global JNDI resources -->
<GlobalNamingResources>
<Environment name="Server.properties"
type="java.lang.String"
value="/usr/local/tomcat/conf/Server.properties" />
</GlobalNamingResources>
I am migrating to Geronimo (WAS-CE, actually) and cannot figure out quite what to put in
geronimo-web.xml.
I can guess most of what I have to do, except for how to express the location of the file (which is set in the "value" attribute on the "Environment" element shown above).
What is the analog of that in Geronimo? Do I need to add a META-INF/context.xml file?
Here are snippets of my web.xml and geronimo-web.xml files:
web.xml
<resource-ref>
<description>Server Properties</description>
<res-ref-name>server/Server.properties</res-ref-name>
<res-type>java.lang.String</res-type>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
geronimo-web.xml
<naming:resource-ref>
<naming:ref-name>server/Server.properties</naming:ref-name>
<naming:resource-link>
/srv/www/cops/htdocs/Server.properties
</naming:resource-link>
</naming:resource-ref>
I'm guessing that <naming:resource-link> is where I put the path of the file.
resource-ref is primarily for connection factories such as jdbc DataSources, although you can use it for URLs as well. For a string, you want to use an env-entry in your