In my messagedriven project I have one point that needs JMX, the deletion of message queues.
Currently, I create my MBean of the qpid broker like the following:
<bean name="jmxConnection"
class="org.springframework.jmx.support.MBeanServerConnectionFactoryBean"
p:serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:8999/jmxrmi" >
<property name="environment">
<map>
<entry key="jmx.remote.credentials">
<bean class="org.springframework.util.StringUtils"
factory-method="commaDelimitedListToStringArray">
<constructor-arg value="username, password" />
</bean>
</entry>
</map>
</property>
</bean>
<bean id="managedBroker" class="org.springframework.jmx.access.MBeanProxyFactoryBean"
p:objectName='org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost="default"'
p:server-ref="jmxConnection"
p:proxyInterface="org.apache.qpid.management.common.mbeans.ManagedBroker" />
That works, but I want to use SSL. On broker side I can set SSL to the JMX connection.
Qpid manual says that the truststore must be set via jconsole.
jconsole -J-Djavax.net.ssl.trustStore=jmxtruststore.jks -J-Djavax.net.ssl.trustStorePassword=password
Is it possible to set the truststore directly on the jmxConnection with Spring?