jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-1664) JNDI Referencable Issues
Date Fri, 25 Jul 2008 13:51:31 GMT

     [ https://issues.apache.org/jira/browse/JCR-1664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Jukka Zitting updated JCR-1664:

    Attachment: JCR-1664.patch

How about the attached patch (JCR-1664.patch)? Instead of explicitly storing the configuration
options, this patch makes BindableRepository contain the full Reference instance. This should
avoid all ordering issues.

I also streamlined these JNDI classes a bit by using the AbstractRepository base class and
the JackrabbitRepository interface, and by inlining many of the static methods that weren't
being used outside the jndi package.

> JNDI Referencable Issues
> ------------------------
>                 Key: JCR-1664
>                 URL: https://issues.apache.org/jira/browse/JCR-1664
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: core 1.4.5, 1.5
>         Environment: linux glassfish jndi spring
>            Reporter: Nicholas Stuart
>             Fix For: 1.5
>         Attachments: JCR-1664.patch, out.patch
> I'm questioning the use of Referencable in the BindableResource and BindableResourceFactory
classes for the JNDI lookup process. Reason for this is because Referencable needs the Addrs
to be in the EXACT order in order for it to be considered the same. (see http://java.sun.com/j2se/1.4.2/docs/api/javax/naming/Reference.html#equals(java.lang.Object)
> In order for me to get the JNDI reference to be found correctly I had to change the BindableResource.getReference
method to swap the order the StringReferences were added to match up what was being passed
in by glassfish. This seems EXTREMELY fragile to me as I don't know what order, say JBoss,
would pass the StringRefences in in the Reference object for the Factory method.
> Also, another problem is that getReference is binding the class name to BindableRepository
class implementation and not javax.jcr.Repository. This again causes them not to match if
you follow the example on the wiki on setting up the JNDI reference and use javax.jcr.Repository
as the type. This can either be fixed by changing the JNDI reference to use the BindableRepository
class or the change the BindableRepository class to set that to the Repository interface.
Not sure which would be considered 'better'
> I have a patch that fixes the first issue (at least for glassfish), but not the second.
Again, this seems like a really 'breakable' setup right now and not sure what would be better
to make sure this is avoided.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message