On Wednesday 28 September 2005 22:32, Michael Wechner wrote:
> Emmanouil Batsis wrote:
> >Now, JSR-170 does *not* specify how a Repository should be obtained. This
> >probably means that to abstract implementation-dependent initialization of
> >repos, you probably have to come up with an abstraction for this. One
> >possibility is to come up with an interface like RepoFactory and load the
> >implementation by getting the actual classname from web.xml.
>
> well, it seems to me that it would make sense that JCR itself would
> provide such an interface, just as jdbc is providing a DatabaseDriver.

The JCR does not but the container infrastructure does; I posted about this on 
jackrabbit-dev and it seems that indeed JNDI is the way to go; additionally, 
implementation-related dependencies can be avoided and there should be no 
need for implementation dependent initializers.

Instead, along with JNDI, the app descriptor will have to declare the repo as 
a resource like:

<resource-env-ref>
  <description>Content Repository</description>
  <resource-env-ref-name>jcr/repository</resource-env-ref-name>
  <resource-env-ref-type>javax.jcr.Repository</resource-env-ref-type>
</resource-env-ref>

and use the value of resource-env-ref-name to obtain the repo from JNDI. If 
you guys give me a go, i'll start working on a patch and test on JBoss and 
Tomcat.

Manos

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to