Cheers,
- Ole
Emmanuel Lecharny wrote:
> Hi guys,
>
> sorry for the "deafening silence" ... We were quite busy those last
> days, up to a point we let this important mail dying silently ...
>
> ok, I agree with David that the current server.xml is, to say the
> least, not very easy to handle, as it does not carry a lot of
> semantic.
>
> Now, from our users perspective, we have two problems :
> 1) current users don't manipulate a lot this file, as you don't fix
> something which work, as soon as it's complicated to male it work
> again, due to the complexity of the current configuration file ( kind
> of circular situation ... )
> 2) new users are simply afraid to touch this configuration file,
> because it's too complex...
>
> We have two ideas to help solving those problems :
> 1) Apache Directory Studio contains a GUI which helps to manupulate
> this file. Not sure that users are aware of that ...
> 2) we really want to move almost all of this configuration into the
> DIT in the next few months, so that we will be able to avoid having
> such a massive configuration file
>
> The second solution will obviously be coupled with a new version of
> the first one.
>
> I would add that there is no good solution to such a problem. We went
> from property file to spring configuration because the property file
> was ugly and didn't carried enough semantic. Now it's the same problem
> again. Pushing all the configuration into the DIT won't add extra
> semantic... This is a dead end. Wat I would suggest in this case is
> the least we change the configuration, the more likely users will get
> used with it. And I pretty much favor a move to the DIT for the sake
> of completeness : using LDAP to manage itself.
>
> Let's face the reality : whatever level of semantic you add to a
> configuration file, you will _always_ need a good doco and nothing
> will replace the RTFM credo...
>
> My 2cts...
>
> On 7/3/07, Chris Custine <[EMAIL PROTECTED]> wrote:
>> I could swear I replied to this the night you sent it but obviously I
>> didn't
>> :-)
>>
>> +1 (caveat below)
>>
>> I love xbean spring config files because I use ActiveMQ and ServiceMix
>> quite
>> a bit and it really does help with some of the verbosity of the spring
>> files. I think the lack of replies was because we have had several
>> discussions about removing the Spring config file and storing the
>> config in
>> the DIT which would render this discussion irrelevant.
>>
>> While we were in Amsterdam I played with the idea of a LDAP Spring
>> context
>> schema that loaded from LDAP and I have also seen some people refer to
>> loading the context as an xml string from a single LDAP entry.
These are
>> all viable options as well.
>>
>> In the mean time, I am all for using xbean to get some more mileage
>> out of
>> the current state of things and maybe this will actually alleviate
>> some of
>> the complaints about server.xml and I think we should do it sooner
rather
>> than later.
>>
>> Chris
>>
>>
>> On 7/2/07, David Jencks <[EMAIL PROTECTED]> wrote:
>> >
>> > On Jul 2, 2007, at 8:32 PM, Aron Sogor wrote:
>> >
>> > > I am no Spring expert but how would it work for 3rd party
>> integration.
>> > > When I want to insert my own "private" Mutable****Configuration?
>> > > How would I register those classes...
>> > > It would seem to make more difficult.
>> >
>> > With xbean-spring you can still use standard spring configuration: I
>> > left 2 beans unconverted in the server.xml below to show this. In
>> > fact the original server.xml still works as well, I converted it a
>> > bean at a time and ran everything I could figure out to make sure it
>> > stayed working. You can also "annotate" your source code and run
the
>> > maven plugin on them to generate a schema (in a different namespace)
>> > and use that to configure your bean with xbean-spring. I don't this
>> > as being more difficult, but as supplying more options.
>> >
>> > thanks
>> > david jencks
>> >
>> > >
>> > > Aron
>> > > David Jencks wrote:
>> > >> So does the deafening silence that greeted this mean everyone is
>> > >> so awed by this that they are left speechless? :-)
>> > >>
>> > >> Seriously, does anyone have any comments on this? Does everyone
>> > >> prefer the untyped spring style?
>> > >>
>> > >> On a related note, I've seen a lot of Mutable****Configuration
>> > >> classes in various spots and AFAICT their only purpose is to
>> > >> support springs troubles with constructor dependency
injection. I
>> > >> think there's a way to use xbean-spring to make the xml style as
>> > >> below fit into constructor dependency injection. Any interest in
>> > >> this, or does everyone prefer what's happening now?
>> > >>
>> > >> thanks
>> > >> david jencks
>> > >>
>> > >>
>> > >> On Jun 28, 2007, at 4:17 PM, David Jencks wrote:
>> > >>
>> > >>> A while back there was some discussion of whether server.xml
>> > >>> could be made to be more semantically meaningful with less
>> > >>> generic cruft, and I suggested looking into xbean-spring. So, I
>> > >>> spent a bit of time on it and implemented this. See https://
>> > >>> issues.apache.org/jira/browse/DIRSERVER-984
>> > >>>
>> > >>> This was pretty easy to do, after fixing some problems in xbean.
>> > >>> Basically all I did was add some javadoc "annotations" to tell
>> > >>> xbean which classes to look at and what type collections
contain,
>> > >>> and change to the xbean application context from the plain
spring
>> > >>> one.
>> > >>>
>> > >>> xbean generates a schema for the configurable objects so you can
>> > >>> consult the schema to see what can be configured. As you can
>> > >>> see, you can mix regular spring configuration and the xbean
style
>> > >>> in the same server.xml.
>> > >>>
>> > >>> There's a lot more customization possible, I basically did the
>> > >>> minimum possible to get it to work. Pretty much anything can
>> > >>> have a different name. The main ugliness I see is the handling
>> > >>> of properties that are lists (or sets) of strings.
>> > >>>
>> > >>> So, at the risk of posting too large a message, here's the
shiny
>> > >>> new server.xml (I removed some commented out bits) :
>> > >>>
>> > >>> <?xml version="1.0" encoding="UTF-8"?>
>> > >>>
>> > >>> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
>> > >>>
>> "http://www.springframework.org/dtd/spring-beans.dtd">
>> > >>>
>> > >>> <beans>
>> > >>> <!-- bean I didn't convert -->
>> > >>> <bean id="environment"
>> > >>>
>> class="org.springframework.beans.factory.config.PropertiesFactoryBea
>> > >>> n">
>> > >>> <property name="properties">
>> > >>> <props>
>> > >>> <!-- JNDI security properties used to get initial
>> > >>> contexts. -->
>> > >>> <prop
>> key="java.naming.security.authentication ">simple</
>> > >>> prop>
>> > >>> <prop
>> > >>> key="java.naming.security.principal">uid=admin,ou=system</prop>
>> > >>> <prop key="
>> java.naming.security.credentials">secret</prop>
>> > >>> </props>
>> > >>> </property>
>> > >>> </bean>
>> > >>>
>> > >>>
>> > >>> <mutableServerStartupConfiguration
>> id="configuration"
>> > >>> xmlns="http://apacheds.org/config/1.0"
>> > >>>
>> workingDirectory="example.com "
>> > >>>
>> synchPeriodMillis="5000"
>> > >>> maxThreads="8"
>> > >>>
>> allowAnonymousAccess="false"
>> > >>>
>> accessControlEnabled="false"
>> > >>>
>> > >>> denormalizeOpAttrsEnabled="false"
>> > >>> >
>> > >>> <ntpConfiguration>
>> > >>> <ntpConfiguration
>> > >>> enabled="false"
>> > >>> ipPort="123">
>> > >>> </ntpConfiguration>
>> > >>> </ntpConfiguration>
>> > >>>
>> > >>> <dnsConfiguration>
>> > >>> <dnsConfiguration
>> > >>> enabled="false"
>> > >>> ipPort="53">
>> > >>> </dnsConfiguration>
>> > >>> </dnsConfiguration>
>> > >>>
>> > >>> <changePasswordConfiguration>
>> > >>> <changePasswordConfiguration
>> > >>> enabled="false"
>> > >>> ipPort="464">
>> > >>> </changePasswordConfiguration>
>> > >>> </changePasswordConfiguration>
>> > >>>
>> > >>> <kdcConfiguration>
>> > >>> <kdcConfiguration
>> > >>> enabled="false"
>> > >>> ipPort="88">
>> > >>> </kdcConfiguration>
>> > >>> </kdcConfiguration>
>> > >>>
>> > >>> <ldapConfiguration>
>> > >>> <ldapConfiguration id="ldapConfiguration"
>> > >>> ipPort="10389"
>> > >>> allowAnonymousAccess="false"
>> > >>> saslHost="ldap.example.com"
>> > >>>
>> saslPrincipal="ldap/[EMAIL PROTECTED] "
>> > >>> searchBaseDn="ou=users,ou=system"
>> > >>> maxTimeLimit="15000"
>> > >>> maxSizeLimit="1000">
>> > >>>
>> > >>> <!-- The list of supported authentication
>> > >>> mechanisms. -->
>> > >>> <supportedMechanisms>
>> > >>> <value xmlns="
>> http://www.springframework.org/schema/
>> > >>> beans">SIMPLE</value>
>> > >>> <value xmlns="
>> http://www.springframework.org/schema/
>> > >>> beans">CRAM-MD5</value>
>> > >>> <value
>> xmlns="http://www.springframework.org/schema/
>> > >>> beans">DIGEST-MD5</value>
>> > >>> <!--<value
>> xmlns="http://www.springframework.org/schema/
>> > >>> beans">GSSAPI</value>-->
>> > >>> </supportedMechanisms>
>> > >>>
>> > >>> <!-- The desired quality-of-protection, used by DIGEST-
>> > >>> MD5 and GSSAPI. -->
>> > >>> <saslQop>
>> > >>> <value
>> xmlns="http://www.springframework.org/schema/
>> > >>> beans">auth</value>
>> > >>> <value xmlns="
>> http://www.springframework.org/schema/
>> > >>> beans">auth-int</value>
>> > >>> <value xmlns="
>> http://www.springframework.org/schema/
>> > >>> beans">auth-conf</value>
>> > >>> </saslQop>
>> > >>>
>> > >>> <!-- The realms serviced by this SASL host, used by
>> > >>> DIGEST-MD5 and GSSAPI. -->
>> > >>> <saslRealms>
>> > >>> <value
>> xmlns="http://www.springframework.org/schema/
>> > >>> beans">example.com</value>
>> > >>> <value
>> xmlns="http://www.springframework.org/schema/
>> > >>> beans">apache.org</value>
>> > >>> </saslRealms>
>> > >>>
>> > >>> <!-- the collection of extended operation handlers to
>> > >>> install -->
>> > >>> <extendedOperationHandlers>
>> > >>> <gracefulShutdownHandler/>
>> > >>> <launchDiagnosticUiHandler/>
>> > >>> </extendedOperationHandlers>
>> > >>> </ldapConfiguration>
>> > >>> </ldapConfiguration>
>> > >>>
>> > >>> <ldapsConfiguration>
>> > >>> <ldapConfiguration id="ldapsConfiguration"
>> > >>> enabled="false"
>> > >>> ipPort="636"
>> > >>> enableLdaps="true">
>> > >>> </ldapConfiguration>
>> > >>> </ldapsConfiguration>
>> > >>>
>> > >>> <systemPartitionConfiguration>
>> > >>> <!-- use the following partitionConfiguration to override
>> > >>> defaults for -->
>> > >>> <!-- the system
>> > >>> partition
>> -->
>> > >>> <mutableBTreePartitionConfiguration
>> > >>> id="systemPartitionConfiguration"
>> > >>> name="system"
>> > >>> cacheSize="100"
>> > >>> suffix="ou=system"
>> > >>> optimizerEnabled="true"
>> > >>> synchOnWrite="true">
>> > >>> <indexedAttributes>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="1.3.6.1.4.1.18060.0.4.1.2.1"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="1.3.6.1.4.1.18060.0.4.1.2.2"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="1.3.6.1.4.1.18060.0.4.1.2.3"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId=" 1.3.6.1.4.1.18060.0.4.1.2.4"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="1.3.6.1.4.1.18060.0.4.1.2.5 "
>> > >>> cacheSize="10"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="1.3.6.1.4.1.18060.0.4.1.2.6"
>> > >>> cacheSize="10"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="1.3.6.1.4.1.18060.0.4.1.2.7"
>> > >>> cacheSize="10"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="ou"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="uid"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="objectClass"
>> > >>> cacheSize="100"/>
>> > >>> </indexedAttributes>
>> > >>> <contextEntry>
>> > >>> <value
>> xmlns="http://www.springframework.org/schema/
>> > >>> beans">
>> > >>> objectClass: top
>> > >>> objectClass: organizationalUnit
>> > >>> objectClass: extensibleObject
>> > >>> ou: system
>> > >>> </value>
>> > >>> </contextEntry>
>> > >>> </mutableBTreePartitionConfiguration>
>> > >>> </systemPartitionConfiguration>
>> > >>>
>> > >>> <partitionConfigurations>
>> > >>> <mutableBTreePartitionConfiguration
>> > >>> id="examplePartitionConfiguration"
>> > >>> name="example"
>> > >>> cacheSize="100"
>> > >>> suffix="dc=example,dc=com"
>> > >>> optimizerEnabled="true"
>> > >>> synchOnWrite="true">
>> > >>> <indexedAttributes>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="1.3.6.1.4.1.18060.0.4.1.2.1"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="1.3.6.1.4.1.18060.0.4.1.2.2"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="1.3.6.1.4.1.18060.0.4.1.2.3"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId=" 1.3.6.1.4.1.18060.0.4.1.2.4"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="1.3.6.1.4.1.18060.0.4.1.2.5 "
>> > >>> cacheSize="10"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="1.3.6.1.4.1.18060.0.4.1.2.6"
>> > >>> cacheSize="10"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="1.3.6.1.4.1.18060.0.4.1.2.7"
>> > >>> cacheSize="10"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="dc"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="ou"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="krb5PrincipalName"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="uid"
>> > >>> cacheSize="100"/>
>> > >>> <mutableIndexConfiguration
>> > >>> attributeId="objectClass"
>> > >>> cacheSize="100"/>
>> > >>> </indexedAttributes>
>> > >>> <contextEntry>
>> > >>> <value
>> xmlns="http://www.springframework.org/schema/
>> > >>> beans">
>> > >>> objectClass: top
>> > >>> objectClass: domain
>> > >>> objectClass: extensibleObject
>> > >>> dc: example
>> > >>> </value>
>> > >>> </contextEntry>
>> > >>> </mutableBTreePartitionConfiguration>
>> > >>> </partitionConfigurations>
>> > >>>
>> > >>> <interceptorConfigurations>
>> > >>> <mutableInterceptorConfiguration
>> > >>> name="normalizationService">
>> > >>> <interceptor>
>> > >>> <normalizationService/>
>> > >>> </interceptor>
>> > >>> </mutableInterceptorConfiguration>
>> > >>> <mutableInterceptorConfiguration
>> > >>> name="authenticationService">
>> > >>> <interceptor>
>> > >>> <authenticationService/>
>> > >>> </interceptor>
>> > >>> </mutableInterceptorConfiguration>
>> > >>> <mutableInterceptorConfiguration
>> > >>> name="referralService">
>> > >>> <interceptor>
>> > >>> <referralService/>
>> > >>> </interceptor>
>> > >>> </mutableInterceptorConfiguration>
>> > >>> <mutableInterceptorConfiguration
>> > >>> name="authorizationService">
>> > >>> <interceptor>
>> > >>> <authorizationService/>
>> > >>> </interceptor>
>> > >>> </mutableInterceptorConfiguration>
>> > >>> <mutableInterceptorConfiguration
>> > >>> name="defaultAuthorizationService">
>> > >>> <interceptor>
>> > >>> <defaultAuthorizationService/>
>> > >>> </interceptor>
>> > >>> </mutableInterceptorConfiguration>
>> > >>> <mutableInterceptorConfiguration
>> > >>> name="exceptionService">
>> > >>> <interceptor>
>> > >>> <exceptionService/>
>> > >>> </interceptor>
>> > >>> </mutableInterceptorConfiguration>
>> > >>> <mutableInterceptorConfiguration
>> > >>> name="operationalAttributeService">
>> > >>> <interceptor>
>> > >>> <operationalAttributeService/>
>> > >>> </interceptor>
>> > >>> </mutableInterceptorConfiguration>
>> > >>> <mutableInterceptorConfiguration
>> > >>> name="schemaService">
>> > >>> <interceptor>
>> > >>> <schemaService/>
>> > >>> </interceptor>
>> > >>> </mutableInterceptorConfiguration>
>> > >>> <mutableInterceptorConfiguration
>> > >>> name="subentryService">
>> > >>> <interceptor>
>> > >>> <subentryService/>
>> > >>> </interceptor>
>> > >>> </mutableInterceptorConfiguration>
>> > >>> <mutableInterceptorConfiguration
>> > >>> name="collectiveAttributeService">
>> > >>> <interceptor>
>> > >>> <collectiveAttributeService/>
>> > >>> </interceptor>
>> > >>> </mutableInterceptorConfiguration>
>> > >>> <mutableInterceptorConfiguration
>> > >>> name="eventService">
>> > >>> <interceptor>
>> > >>> <eventService/>
>> > >>> </interceptor>
>> > >>> </mutableInterceptorConfiguration>
>> > >>> <mutableInterceptorConfiguration
>> > >>> name="triggerService">
>> > >>> <interceptor>
>> > >>> <triggerService/>
>> > >>> </interceptor>
>> > >>> </mutableInterceptorConfiguration>
>> > >>>
>> > >>> </interceptorConfigurations>
>> > >>> </mutableServerStartupConfiguration>
>> > >>>
>> > >>>
>> > >>> <!-- another bean I didn't convert -->
>> > >>> <bean
>> > >>>
>> class="org.springframework.beans.factory.config.CustomEditorConfigur
>> > >>> er">
>> > >>> <property name="customEditors">
>> > >>> <map>
>> > >>> <entry
>> key="javax.naming.directory.Attributes">
>> > >>> <bean
>> > >>>
>> class="org.apache.directory.server.core.configuration.AttributesProp
>> > >>> ertyEditor"/>
>> > >>> </entry>
>> > >>> </map>
>> > >>> </property>
>> > >>> </bean>
>> > >>> </beans>
>> > >>>
>> > >>>
>> > >>> Comments?
>> > >>>
>> > >>> thanks
>> > >>> david jencks
>> > >>>
>> > >>>
>> > >>
>> > >>
>> > >
>> >
>> >
>>
>>
>
>