directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject Re: Custom schema objects
Date Wed, 01 Feb 2012 10:51:22 GMT
On 2/1/12 11:36 AM, Kiran Ayyagari wrote:
> On Wed, Feb 1, 2012 at 3:49 PM, Christoph Czurda
> <>  wrote:
>> On 01/10/2012 01:47 PM, Kiran Ayyagari wrote:
>>> to mention it quickly, new schema elements cannot be registered using
>>> connection.loadSchema()
>>> you need to upload the new schema elements to the server.
>>> Please search the ML, this was already answered before.
>> Hi,
>> I'm sorry but I can't get this to work. I will explain every step I
>> took. Please try to explain to me also step by step what I'm missing. If
>> you are unclear about what I did at some point, please ask. I really
>> want to get this working.
>> I used the schema editor from Directory Studio and created a new schema
>> project. In the project I included the already existing schemas 'java',
>> 'core' and 'system'. Next I created a new schema called 'openengsb'. I
>> created my attributetypes and objectclasses. Then I clicked 'export
>> schema for Apacheds'. Then I connected to the server and imported the
>> ldif. The schema is now under cn=openengsb,ou=schema. I can also create
>> entries from my schema objects.
>> However, in my application I can use my own schema objects ONLY if I
>> don't use connection.loadSchema(). I know that loadSchema() only loads
>> the default schemas that are bundled with the api. But how can I make my
>> application aware of my schema / load my own schema?
> you have to use the NetworkSchemaLoader to load the schema present on
> the server (this only works for ApacheDS)
> 1. create LdapNetworkConnection
> 2. bind to the server using the above connection
> 3. create an instance of NetworkSchemaLoader using the above connection
> 3. call connection.loadSchema() by passing the schema loader created in step 3

That's an option, but it's an heavy one. See my response in another thread.

Emmanuel L├ęcharny

View raw message