Indexed configuration properties

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Indexed configuration properties

PRONZATO Cedric RD-BIZZ-GRE
Hi,
 
While I am not yet banned from the mailing I want to report an other thing =)
 
[code]
    <container name="javamail-container" class="org.ofbiz.service.mail.JavaMailContainer">
        <property name="delegator-name" value="default"/>
        <property name="dispatcher-name" value="JavaMailDispatcher"/>
        <property name="run-as-user" value="system"/>
        <property name="poll-delay" value="300000"/>
        <property name="delete-mail" value="false"/>
        <property name="maxSize" value="100000"/>
        <property name="default-listener" value="store-listener">
            <property name="mail.store.protocol" value="imap"/>
            <property name="mail.host" value="[host]"/>
            <property name="mail.user" value="[user]"/>
            <property name="mail.pass" value="[pass]"/>
            <property name="mail.debug" value="false"/>
        </property>
    </container>
[code]
 
I think there is *hack* here with the statement '<property name="default-listener" value="store-listener">'. This property is a kind of *indexed* property, it means that if you want multiple occurance you will have to do as the following:
 
[code]
...
        <property name="default-listener" value="store-listener">
            <property name="mail.store.protocol" value="imap"/>
            <property name="mail.host" value="[host]"/>
            <property name="mail.user" value="[user]"/>
            <property name="mail.pass" value="[pass]"/>
            <property name="mail.debug" value="false"/>
        </property>
...
        <property name="my-wonderful-new-mail-account" value="store-listener">
            <property name="mail.store.protocol" value="imap"/>
            <property name="mail.host" value="[host]"/>
            <property name="mail.user" value="[user]"/>
            <property name="mail.pass" value="[pass]"/>
            <property name="mail.debug" value="false"/>
        </property>
...
[code]
 
So the code use the values to retrieve the properties. Isn't there a more beautiful things to do like using indexed properties (which means having a list at some point in the configuration handling classes)?
If you think same as me, I will open a JIRA task.
 
Thx,
Cédric