Results 1 to 2 of 2

Thread: Configuration of keystore

  1. #1
    Join Date
    Nov 2010
    Posts
    7

    Default 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 at 09:52 AM. Reason: grammar

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •