directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <brett.por...@gmail.com>
Subject Re: [naming] XmlConfigurator and element order
Date Tue, 14 Feb 2006 20:16:36 GMT
I assume this is because it uses a HashMap to store parameters. I
would think it is unusual to use resource parameters for this purpose.
Usually I used a set or parameters retrieved as a list instead.

However, you could file a bug to ask that the order in the map be preserved.

- Brett

On 2/15/06, Jeff Lansing <jlansing@spawar.navy.mil> wrote:
>
>
>
> Hi,
>
>
>
> I thought it would be useful to chain MINA IoFilters together using JNDI,
> something like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <naming>
>
>   <context>
>
>     <resource name="ibs/session/chain"
> type="xtcf.ibs.session.DefaultIoFilterChainBuilder">
>
>       <parameter>
>
>         <name>factory</name>
>
>
> <value>xtcf.ibs.session.IoFilterChainBuilderFactory</value>
>
>       </parameter>
>
>       <parameter>
>
>         <name>raw-logger</name>
>
>         <value>org.apache.mina.filter.LoggingFilter</value>
>
>       </parameter>
>
>       <parameter>
>
>         <name>raw-handler</name>
>
>
> <value>xtcf.ibs.message.handler.RawMessageHandler</value>
>
>       </parameter>
>
>       <parameter>
>
>         <name>raw-message-codec</name>
>
>
> <value>xtcf.ibs.message.handler.RawCodecFilter</value>
>
>       </parameter>
>
>       <parameter>
>
>         <name>parser-logger</name>
>
>         <value>org.apache.mina.filter.LoggingFilter</value>
>
>       </parameter>
>
>       <parameter>
>
>         <name>xml-handler</name>
>
>
> <value>xtcf.ibs.message.handler.XMLMessageHandler</value>
>
>       </parameter>
>
>       <parameter>
>
>         <name>xml-logger</name>
>
>         <value>org.apache.mina.filter.LoggingFilter</value>
>
>       </parameter>
>
>       <parameter>
>
>         <name>jms-handler</name>
>
>
> <value>xtcf.ibs.message.handler.JMSMessageHandler</value>
>
>       </parameter>
>
>     </resource>
>
>   </context>
>
> </naming>
>
> Unfortunately this doesn't work correctly because the XmlConfigurator
> (actually the Config.Resource inner class) destroys the order of the
> elements. I'm pretty sure that, although XML attributes are unordered, there
> is an implied order to XML elements. Shouldn't this order be preserved?
>
>
>
> Thanks,
>
>
>
> Jeff

Mime
View raw message