You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Göktürk Gezer (Created JIRA)" <ji...@apache.org> on 2011/10/20 03:18:10 UTC

[jira] [Created] (DIRSERVER-1672) Making Comparators extendable

Making Comparators extendable
-----------------------------

                 Key: DIRSERVER-1672
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
             Project: Directory ApacheDS
          Issue Type: Improvement
    Affects Versions: 2.0.0-M4
            Reporter: Göktürk Gezer
             Fix For: 2.0.0-M4
         Attachments: comparator_management.diff

To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Göktürk Gezer updated DIRSERVER-1672:
-------------------------------------

    Attachment: comparator_extension.diff
    
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_extension.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131861#comment-13131861 ] 

Göktürk Gezer commented on DIRSERVER-1672:
------------------------------------------

Did you install and started apacheds-osgi-service after launching felix. Or launched with the other bundles?
                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_management.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Pierre-Arnaud Marcelot (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131794#comment-13131794 ] 

Pierre-Arnaud Marcelot commented on DIRSERVER-1672:
---------------------------------------------------

I did some test using the OSGI-ApacheDS launch configuration as well, I couldn't get a comparator to load.
I followed the execution set by step and unfortunately the IPojoHelper class was not able to instantiate any comparators and returned null:
    LdapComparator<?> comparator = ( LdapComparator<?> ) IPojoHelper.createIPojoComponent( factoryName, null, props );

Am i missing something?
                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_management.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Göktürk Gezer updated DIRSERVER-1672:
-------------------------------------

    Comment: was deleted

(was: Hey i guess, you patched the diff t the branch. I have working branch right now but just don't know how to send it to you :)

I'm getting HEAD revision while patching and my svn history is totally confused right now. If you applied the patch, tell me and i will redownload it and patch it again.)
    
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131248#comment-13131248 ] 

Göktürk Gezer commented on DIRSERVER-1672:
------------------------------------------

Patch for apacheds osgi branch is added to make Comparators extendable while keeping existing nonOSGI clients working.
                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_management.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Göktürk Gezer updated DIRSERVER-1672:
-------------------------------------

    Comment: was deleted

(was: Hi Pierre,

I fixed the current issues with the patch. Sorry, it was meant to demonstrate, i left it so unstable. Now it works without any action. You don't have to post-load the service-osgi. Just debug it and see.

I moved logic from DefaultSchemaManager to DefaultSchemaManagerOSGI class. So the tests must be run. Also ApacheDS is running normally. I guess if we go that way, maybe we can even save standalone ApacheDS too :)

PS: Its not an addition to the patch before, you have to apply it from beginning.)
    
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Göktürk Gezer updated DIRSERVER-1672:
-------------------------------------

    Comment: was deleted

(was: So, you must be faced with the SyntaxChecker exception if you start on felix. Just put breakpoint on, DefaultSchemaManagerOSGI.addComparators() and see if it is getting LdapComparator references in all iterations.)
    
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Pierre-Arnaud Marcelot (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134048#comment-13134048 ] 

Pierre-Arnaud Marcelot commented on DIRSERVER-1672:
---------------------------------------------------

Great! :)

I merged the latest modifications from trunk to the OSGI branches that were created by Emmanuel a few days.

I think we can work on those branches until we find the good way to integrate OSGI, first in the API, and then inside ApacheDS.

For the records, here are the branches URLs:
- Shared | https://svn.apache.org/repos/asf/directory/shared/branches/shared-osgi/
- ApacheDS | https://svn.apache.org/repos/asf/directory/apacheds/branches/apacheds-osgi/
- Branch with dependencies | https://svn.apache.org/repos/asf/directory/apacheds/branches/apacheds-osgi-with-dependencies/

I also applied your patch to the branches.
                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_extension.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Göktürk Gezer updated DIRSERVER-1672:
-------------------------------------

    Comment: was deleted

(was: Hi Pierre,

As it is now OSGI application, these kinds of test errors are excepted. I didn't even look at it  actually:) But i guess i will fully duplicate some classes after today's discussions to preserve old things. It is just a matter of duplicating Default SchemaManager with OSGI version rather than modifying it. I will do that today if i find enough time.)
    
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Göktürk Gezer updated DIRSERVER-1672:
-------------------------------------

    Comment: was deleted

(was: Did you install and started apacheds-osgi-service after launching felix. Or launched with the other bundles?)
    
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131884#comment-13131884 ] 

Göktürk Gezer commented on DIRSERVER-1672:
------------------------------------------

Hi Pierre,

I fixed the current issues with the patch. Sorry, it was meant to demonstrate, i left it so unstable. Now it works without any action. You don't have to post-load the service-osgi. Just debug it and see.

I moved logic from DefaultSchemaManager to DefaultSchemaManagerOSGI class. So the tests must be run. Also ApacheDS is running normally. I guess if we go that way, maybe we can even save standalone ApacheDS too :)

PS: Its not an addition to the patch before, you have to apply it from beginning.
                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_extension_fixed.diff, comparator_management.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131270#comment-13131270 ] 

Göktürk Gezer commented on DIRSERVER-1672:
------------------------------------------

With this patch, apacheds-service-osgi is removed from the Felix's auto.start list. after launching felix. install it manually into framework using

start file:../../apacheds/service-osgi/target/apacheds-osgi-service-2.0.0-M4-SNAPSHOT.jar

It is for making other bundles to initialize correctly. There are lots of workarounds for solving this. Not a major problem. Can be fiixed using OSGI Event layer.
                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_management.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131895#comment-13131895 ] 

Göktürk Gezer commented on DIRSERVER-1672:
------------------------------------------

Hey i guess, you patched the diff t the branch. I have working branch right now but just don't know how to send it to you :)

I'm getting HEAD revision while patching and my svn history is totally confused right now. If you applied the patch, tell me and i will redownload it and patch it again.
                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_extension_fixed.diff, comparator_management.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131972#comment-13131972 ] 

Göktürk Gezer commented on DIRSERVER-1672:
------------------------------------------

Hi Pierre,

Sorry, i guess i patched it so unstable. Now it is fixed. I removed the old patch and attached a new one. Apply it from scratch to the apacheds-osgi-branch.

With that patch. You don't have to post-load the apacheds-service-osgi, you can directly invoke ApacheDS-OSGI.launcher. Its config is refreshed for coping with that post-load problem. DefaultSchemaManager is reverted back to its orginal version and new OSGISchemaManager is created. Just put breakpoint on OSGISchemaManager.addComparators() method and see if it gets correct LdapComparator references in each iteration. You can also launch old apacheds-service, because DefaultSchemaManager is reverted back to its originial. It still works as standalone application.
                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_extension.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Göktürk Gezer updated DIRSERVER-1672:
-------------------------------------

    Comment: was deleted

(was: Ooo wait wait, patch is corrupted. My svn history got crazy i guess. Trying to generate healty diff.)
    
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Göktürk Gezer updated DIRSERVER-1672:
-------------------------------------

    Attachment:     (was: comparator_extension_fixed.diff)
    
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Göktürk Gezer updated DIRSERVER-1672:
-------------------------------------

    Attachment: comparator_extension_fixed.diff
    
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_extension_fixed.diff, comparator_management.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Göktürk Gezer updated DIRSERVER-1672:
-------------------------------------

    Attachment: comparator_management.diff
    
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_management.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13132858#comment-13132858 ] 

Göktürk Gezer commented on DIRSERVER-1672:
------------------------------------------

Hi Pierre,

I'm glad you liked. Yeah the problems you've spotted can be solved like that. I was thinking to implement that detect logic into code but just didn't want to change the code so much. So it absolutely can be handled that way. I'm not sure but maybe in the end we can preserve old standlone application which works nonextandable.(But lets not depend on it :) )
                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_extension.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131885#comment-13131885 ] 

Göktürk Gezer commented on DIRSERVER-1672:
------------------------------------------

So, you must be faced with the SyntaxChecker exception if you start on felix. Just put breakpoint on, DefaultSchemaManagerOSGI.addComparators() and see if it is getting LdapComparator references in all iterations.
                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_extension_fixed.diff, comparator_management.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (DIRSERVER-1672) Making Comparators extendable

Posted by "Pierre-Arnaud Marcelot (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pierre-Arnaud Marcelot updated DIRSERVER-1672:
----------------------------------------------

    Fix Version/s:     (was: 2.0.0-M4)
                   2.0.0-M5
    
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M5
>
>         Attachments: comparator_extension.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Pierre-Arnaud Marcelot (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131567#comment-13131567 ] 

Pierre-Arnaud Marcelot commented on DIRSERVER-1672:
---------------------------------------------------

Hi Göktürk,

I imported the patch.

However I'm getting the following test failures, did you have the same too?

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.directory.shared.ldap.schemaextractor.impl.SchemaLdifExtractorTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.113 sec
Running org.apache.directory.shared.ldap.schemaloader.JarLdifSchemaLoaderTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.295 sec <<< FAILURE!
Running org.apache.directory.shared.ldap.schemaloader.LdifSchemaLoaderTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.528 sec <<< FAILURE!
Running org.apache.directory.shared.ldap.schemaloader.MatchingRuleTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.993 sec <<< FAILURE!
Running org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest
Tests run: 58, Failures: 0, Errors: 57, Skipped: 0, Time elapsed: 2.555 sec <<< FAILURE!
Running org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest
Tests run: 30, Failures: 0, Errors: 30, Skipped: 0, Time elapsed: 1.813 sec <<< FAILURE!
Running org.apache.directory.shared.ldap.schemaloader.SchemaManagerEnableDisableLoadTest
Tests run: 7, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 1.243 sec <<< FAILURE!
Running org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest
Tests run: 19, Failures: 0, Errors: 15, Skipped: 2, Time elapsed: 1.904 sec <<< FAILURE!
Running org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest
Tests run: 14, Failures: 0, Errors: 13, Skipped: 0, Time elapsed: 1.526 sec <<< FAILURE!

Results :

Tests in error: 
  testJarLdifSchemaLoader(org.apache.directory.shared.ldap.schemaloader.JarLdifSchemaLoaderTest): Required Comparator is not registered
  testLoader(org.apache.directory.shared.ldap.schemaloader.LdifSchemaLoaderTest): Required Comparator is not registered
  org.apache.directory.shared.ldap.schemaloader.MatchingRuleTest: Required Comparator is not registered
  testAddAttributeTypeNoSupCollectiveUser(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeNoSupNoSyntaxNoSuperior(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeSupCollectiveUser(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeNoSupCollectiveOperational(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAlreadyExistingNormalizer(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddValidMatchingRule(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeNoSupInvalidOrderingMR(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeNoSupNoUserModificationUserAplication(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeNoSupInvalidSubstringMR(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeNoEqualityMR(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAlreadyExistingComparator(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddMatchingRuleExistingName(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeNameOfAnObjectClass(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeSupNoSyntaxNoSuperior(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddMatchingRuleNotExistingSyntax(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeSupBadSup(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeNoSupInvalidEqualityMR(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeNoSupNoUserModificationOpAttr(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeSupWithOwnSup(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeSupDifferentUsage(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassSuperiorsStructuralWithAuxiliaryInSup(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddNewNormalizer(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassSuperiorsWithCycle(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddMatchingRuleExistingOID(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeNoSupValidMR(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeAlreadyExist(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddMatchingRuleNotExistingSchema(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassSuperiorsAuxiliaryWithStructuralInSup(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddSyntaxExistingOid(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddNewSyntaxChecker(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassNoSuperiorATMoreThanOnceInMay(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassNoSuperiorCollectiveATInMustOrMay(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassNoSuperiorATMoreThanOnceInMust(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassSuperiorsNonExistingOCInSup(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassNoSuperiorNonExistingAtInMay(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddNewComparator(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassSuperiorsOcMoreThanOnceInSup(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassNoSuperiorATInMustAndMay(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeNameAlreadyExist(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddMatchingRuleExistingATName(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassNoSuperiorNonExistingAtInMust(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassSuperiorsValid(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddNormalizerWithWrongFQCN(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddMatchingRuleNoSyntax(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAttributeTypeCollectiveOperationalSigleValue(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassNoSuperiorWithATName(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassNoSuperiorWithExistingOCName(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddAlreadyExistingSyntaxChecker(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassSuperiorsATInMustPresentInSuperiorsMay(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassNoSuperiorValid(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassNoSuperiorWithExistingOid(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddComparatorWithWrongFQCN(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddValidSyntax(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassSuperiorsATInMayPresentInSuperiorsMust(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassSuperiorsAbstractWithAuxiliaryInSup(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddSyntaxCheckerWithWrongFQCN(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testAddObjectClassSuperiorsAbstractWithStructuralInSup(org.apache.directory.shared.ldap.schemaloader.SchemaManagerAddTest): Required Comparator is not registered
  testDeleteExistingAttributeTypeUsedByOC(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingAttributeType(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteNonExistingAttributeType(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDelAttributeTypeFromDisabledSchema(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingAttributeTypeUsedByDescendant(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingComparator(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteNonExistingComparator(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingComaparatorUsedByMatchingRule(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingComparatorUsedByRemovedMatchingRule(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteNonExistingMatchingRule(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingSyntaxUsedByAttributeType(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingMatchingRuleUsedByAttributeType(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingMatchingRuleUsedByRemovedAttributeType(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingNormalizer(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteNonExistingNormalizer(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingNormalizerUsedByMatchingRule(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingNormalizerUsedByRemovedMatchingRule(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingObjectClass(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteNonExistingObjectClass(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingSyntaxCheckerUsedBySyntax(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingSyntax(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteNonExistingSyntaxChecker(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingSyntaxChecker(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingSyntaxUsedByRemovedAttributeType(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingSyntaxUsedByMatchingRule(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingSyntaxCheckerUsedByRemovedSyntax(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingMatchingRule(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteNonExistingSyntax(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingObjectClassUsedByAnotherObjectClass(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testDeleteExistingSyntaxUsedByRemovedMatchingRule(org.apache.directory.shared.ldap.schemaloader.SchemaManagerDelTest): Required Comparator is not registered
  testLoadAllEnabled(org.apache.directory.shared.ldap.schemaloader.SchemaManagerEnableDisableLoadTest): Required Comparator is not registered
  testEnableDisabled(org.apache.directory.shared.ldap.schemaloader.SchemaManagerEnableDisableLoadTest): Required Comparator is not registered
  testEnableAlreadyEnabled(org.apache.directory.shared.ldap.schemaloader.SchemaManagerEnableDisableLoadTest): Required Comparator is not registered
  testDisableEnabled(org.apache.directory.shared.ldap.schemaloader.SchemaManagerEnableDisableLoadTest): Required Comparator is not registered
  testEnableDisabledDependingOnDisabled(org.apache.directory.shared.ldap.schemaloader.SchemaManagerEnableDisableLoadTest): Required Comparator is not registered
  testLoadSystem(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadCore(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadApache(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadApacheMeta(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadJava(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadOther(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadCosine(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadInetOrgPerson(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadCollective(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadKrb5Kdc(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadNis(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadWrongSchema(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadCoreAndInetOrgPerson(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadCoreInetOrgPersonAndBad(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadSchemasWithDepsCoreInetOrgPersonAndBad(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadTest): Required Comparator is not registered
  testLoadSystem(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest): Required Comparator is not registered
  testLoadCore(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest): Required Comparator is not registered
  testLoadApache(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest): Required Comparator is not registered
  testLoadJava(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest): Required Comparator is not registered
  testLoadApacheMeta(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest): Required Comparator is not registered
  testLoadCosine(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest): Required Comparator is not registered
  testLoadInetOrgPerson(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest): Required Comparator is not registered
  testLoadCollective(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest): Required Comparator is not registered
  testLoadOther(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest): Required Comparator is not registered
  testLoadKrb5Kdc(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest): Required Comparator is not registered
  testLoadCoreAndInetOrgPerson(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest): Required Comparator is not registered
  testLoadCoreInetOrgPersonAndNis(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest): Required Comparator is not registered
  testLoadWithDepsCoreInetOrgPersonAndNis(org.apache.directory.shared.ldap.schemaloader.SchemaManagerLoadWithDepsTest): Required Comparator is not registered

Tests run: 132, Failures: 0, Errors: 123, Skipped: 2

                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_management.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Pierre-Arnaud Marcelot (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13132712#comment-13132712 ] 

Pierre-Arnaud Marcelot commented on DIRSERVER-1672:
---------------------------------------------------

Hi Göktürk,

Good news, I was able to run the server this time. :)
I mean, until it crashes on the Syntax Checkers... But this is normal.

Congrats on the solution with iPojo. It seem to be fixing our classloading with OSGI issue quite well.
I really like that it comes with only one new dependency (we try to keep them very low) and that it only needs a few annotations here and there on the extensions (the comparators in our particular example).

However, I noticed a few things that could be improved.

1/ Code duplication:
I've seen that, in order to be able to launch ApacheDS in both mode (JARs/OSGI), you had to duplicate the DefaultSchemaManager class with an OSGISchemaManager class.
Same thing for the 'apacheds-service' project, which was duplicated with an 'apacheds-service-osgi' project, and in which you explicitly use the OSGISchemaManager class instead of the DefaultSchemaManager class.

2/ Doesn't work as standard jars because of point 1:
This second thing is tightly linked to the other point.
Because the solution requires to explicitly use an OSGISchemaManager when in an OSGI container, the LDAP API does not work when deployed in an OSGI environment.
The current code defaults to the original DefaultSchemaManager and then classloading issues appear.
I tested this under Eclipse.
To verify this you need to remove the extra imported packages (which was a bloody hack for our own use) in the pom.xml file of the 'shared-ldap-schema-data' project.

Solution:
I think we can get rid of both points fairly easily (while keeping the iPojo solution, which works really great).
My solution would be to let the schema manager detect in which kind of environment it is running (deployed in an OSGI or not).
In that case, instead of duplicating the whole class, we would only have a method indicating if we are running in an OSGI container. If we do, then we use your solution with iPojo for loading the extensions and if we don't we simply use Class.forName(...).
In that case, there's no need to duplicate the 'apacheds-service' project anymore.
And, most importantly, the usage of the API does not differ from one mode to the other. The code is exactly the same whether your using an OSGI container or not. I think this is a key feature here.

Detecting if we are running in an OSGI container is very simple. Here's a method I've written:
    public static boolean isRunningInOsgiContainer()
    {
        return org.osgi.framework.FrameworkUtil.getBundle( DefaultSchemaManager.class ) != null;
    }

What do you think about this solution?

Thanks,
Pierre-Arnaud
                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_extension.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131887#comment-13131887 ] 

Göktürk Gezer commented on DIRSERVER-1672:
------------------------------------------

Ooo wait wait, patch is corrupted. My svn history got crazy i guess. Trying to generate healty diff.
                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_extension_fixed.diff, comparator_management.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131782#comment-13131782 ] 

Göktürk Gezer commented on DIRSERVER-1672:
------------------------------------------

Hi Pierre,

As it is now OSGI application, these kinds of test errors are excepted. I didn't even look at it  actually:) But i guess i will fully duplicate some classes after today's discussions to preserve old things. It is just a matter of duplicating Default SchemaManager with OSGI version rather than modifying it. I will do that today if i find enough time.
                
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>         Attachments: comparator_management.diff
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (DIRSERVER-1672) Making Comparators extendable

Posted by "Göktürk Gezer (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-1672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Göktürk Gezer updated DIRSERVER-1672:
-------------------------------------

    Attachment:     (was: comparator_management.diff)
    
> Making Comparators extendable
> -----------------------------
>
>                 Key: DIRSERVER-1672
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1672
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M4
>            Reporter: Göktürk Gezer
>              Labels: apacheds, osgi, shared
>             Fix For: 2.0.0-M4
>
>
> To provide 3th parties an ability to write their own schema elements, the first part is making LdapComparators pluggable to shared-ldap-model. And existing clients must be preserved as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira