-
Task
-
Resolution: Done
-
Major
-
3.0.0.Alpha3
Create a simple web application module in our examples (https://github.com/ModeShape/modeshape-examples) that upon each client request:
- obtains a specific repository in JNDI (e.g., "jcr/local/sample") or the JCR Repository Factory (e.g., with ModeShape URL of "jndi:jcr/local/sample")
- logs into the repository to get a Session
- converts the URL into a path to find the node at that path
- generates a simple response with the properties of that node and the list of children
- closes the Session (in a finally block)
The web apps configuration should the JNDI name or URL as a parameter: if the URL begins with "jndi:" then the RepositoryFactory approach should be used; otherwise, JNDI should be used.
(Alternatively, the URL and JNDI name could be specified in the web.xml, and the app uses them explicitly, choosing one over the other if both are specified.)