ActiveMQ HttpClientTransport contains the following methods that you can use to specify the host and port of the proxy:
public void setProxyHost(String proxyHost) public void setProxyPort(int proxyPort)
For version 5.6+, you can also specify the proxy username and password:
public void setProxyUser(String proxyUser) public void setProxyPassword(String proxyPassword)
To configure JmsInvokerProxyFactoryBean:
<bean id="jmsClientFactory" class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL"> <value>http://myendpoint.somewhere.com:5186?proxyUser=fred&proxyPassword=ahoy&proxyHost=myproxyhost.somewhere.com&proxyPort=8081</value> </property> </bean> <bean id="remotingService" class="org.springframework.jms.remoting.JmsInvokerProxyFactoryBean"> <property name="serviceInterface" value="com.foo.CheckingAccountService"/> <property name="connectionFactory" ref="jmsClientFactory"/> <property name="queue" ref="queue"/> </bean>
Nicholas
source share