Announcement Announcement Module
Collapse
No announcement yet.
How to define bean property of type java.util.Properties? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to define bean property of type java.util.Properties?

    Hi, I have what should be a simple question but I can't seem to figure this one out.

    I have the following bean defined:
    Code:
        <bean id="messageSender" class="org.springframework.ws.transport.http.CommonsHttpMessageSender">
            <property name="connectionTimeout" value="15000"/>
    
            <property name="readTimeout" value="60000"/>
    
            <property name="maxTotalConnections" value="20"/>
    
            <property name="maxConnectionsPerHost" value=""/>
        </bean>
    The maxConnectionsPerHost property actually needs to be of type java.util.Properties. How would I go about setting that?

    Thanks-

  • #2
    Figured it out.

    Code:
        <bean id="messageSender" class="org.springframework.ws.transport.http.CommonsHttpMessageSender">
            <property name="connectionTimeout" value="15000"/>
    
            <property name="readTimeout" value="60000"/>
    
            <property name="maxTotalConnections" value="20"/>
    
            <property name="maxConnectionsPerHost">
                <props>
                    <prop key="www.somehost.com">20</prop>
                </props>
            </property>
        </bean>

    Comment

    Working...
    X