Announcement Announcement Module
Collapse
No announcement yet.
Configuration of keystore Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Configuration of keystore

    I am migrating my Mule project into Spring Integration 2.0.0.RELEASE. In Mule there is simple keystore configuration for imaps.

    Code:
     <imaps:connector name="imapConnector" checkFrequency="${imap.checkFrequency}" deleteReadMessages="${imap.deleteReadMessages}" >
            <imaps:tls-client path="${keystore}" storePassword="${keystore.password}" />
            <imaps:tls-trust-store path="${keystore}" storePassword="${keystore.password}" />
    </imaps:connector>
    I did the same with the following bean

    Code:
    <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
    		<property name="targetObject">
    			<!-- System.getProperties() -->
    			<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
    				<property name="targetClass" value="java.lang.System" />
    				<property name="targetMethod" value="getProperties" />
    			</bean>
    		</property>
    		<property name="targetMethod" value="putAll" />
    		<property name="arguments">
    			<!-- The new Properties -->
    			<util:properties>
    				<prop key="javax.net.ssl.trustStore">${keystore}</prop>
    				<prop key="javax.net.ssl.keyStore">${keystore}</prop>
    				<prop key="javax.net.ssl.keyStorePassword">${keystore.password}</prop>
    				<prop key="javax.net.ssl.trustStorePassword">${keystore.password}</prop>
    			</util:properties>
    		</property>
    	</bean>
    Does not exist any easier way?
    Last edited by banterCZ; Nov 25th, 2010, 10:52 AM. Reason: grammar

  • #2
    Since these are system properties, why not just set them using -D when you start the process?

    Comment

    Working...
    X