directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Lansing" <jlans...@spawar.navy.mil>
Subject [naming] XmlConfigurator and element order
Date Tue, 14 Feb 2006 18:26:51 GMT
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