activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daryl Richter <ng...@comcast.net>
Subject Re: ActiveMQ JMS Bridge to Websphere MQ
Date Thu, 20 Sep 2007 22:43:51 GMT
I notice that you are not supplying any authentication.  Is it  
possible that your MQ Series broker requires it?


On Sep 20, 2007, at 3:07 PM, thaibox1 wrote:

>
> I'm using MQ series 5.2 (I know it's old, but it's supposedly JMS  
> compliant).
> We're looking to move off Websphere MQ and I'm evaluating ActiveMQ,  
> but
> we're still going to need to hook it up to Websphere MQ since most  
> of our
> remote clients use that app for remote messaging.  The problem I'm  
> facing is
> that I'm struggling to configure the JMS bridge to successfully  
> connect to
> Websphere MQ. Here is the activemq.xml file that I'm using:
>
> <beans>
>
>   <!-- Allows us to use system properties as variables in this  
> configuration
> file -->
>   <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderCon 
> figurer"/>
>
>   <broker xmlns="http://activemq.org/config/1.0"
>           brokerName="ALERTQ"
>           useJmx="true"
>           persistent="true">
>
>     <!--  Use the following to set the broker memory limit -->
>     <memoryManager>
>         <usageManager id="memory-manager" limit="256 MB"/>
>     </memoryManager>
>
>     <destinations>
>        <queue physicalName="US.TO.THEM" />
>        <queue physicalName="THEM.TO.US" />
>        <topic physicalName="ALERT.TOPIC" />
>     </destinations>
>
>     <transportConnectors>
>        <transportConnector name="openwire" uri="tcp://mqserver: 
> 31313" />
>                            <!-- discoveryUri="multicast://default" -->
>     </transportConnectors>
>
>     <networkConnectors>
>       <!-- by default just auto discover the other brokers -->
>       <!-- <networkConnector name="default-nc" uri="multicast:// 
> default"/>
> -->
>     </networkConnectors>
>
>     <!-- Use the following to configure how ActiveMQ is exposed in  
> JMX -->
>     <managementContext>
>        <managementContext connectorPort="5099"
>                           jmxDomainName="org.apache.activemq"/>
>     </managementContext>
>
> 	<jmsBridgeConnectors>
> 		<jmsQueueConnector outboundQueueConnectionFactory="#remoteFactory">
> 			<inboundQueueBridges>
> 				<inboundQueueBridge inboundQueueName="THEM.TO.US"
> 				                    localQueueName="THEM.TO.US"/>
> 			</inboundQueueBridges>
> 			<outboundQueueBridges>
> 				<outboundQueueBridge outboundQueueName="US.TO.THEM"
> 				                     localQueueName="US.TO.THEM"/>
> 			</outboundQueueBridges>
> 		</jmsQueueConnector>
> 	</jmsBridgeConnectors>
> 	
>     <!-- In ActiveMQ 4, you can setup destination policies -->
>     <destinationPolicy>
>       <policyMap><policyEntries>
>           <policyEntry topic="ALERT.>">
>             <dispatchPolicy>
>               <strictOrderDispatchPolicy />
>             </dispatchPolicy>
>             <subscriptionRecoveryPolicy>
>               <lastImageSubscriptionRecoveryPolicy />
>             </subscriptionRecoveryPolicy>
>           </policyEntry>
>       </policyEntries></policyMap>
>     </destinationPolicy>
>
>
>     <persistenceAdapter>
>         <journaledJDBC journalLogFiles="5"
> dataDirectory="${activemq.base}/activemq-data"/>
>     </persistenceAdapter>
>
>   </broker>
>
>   <bean id="remoteFactory"  
> class="com.ibm.mq.jms.MQQueueConnectionFactory">
> 	<property name="transportType" value="1"/>
> 	<property name="hostName" value="remoteIP"/>
> 	<property name="port" value="1444"/>
> 	<property name="queueManager" value="ALERTQ"/>
> 	<property name="channel" value="US.TO.THEM"/>
>   </bean>
>
> When I start it up, I get:
>
> ./activemq
> ACTIVEMQ_HOME: /u/pkgs/activemq/4.1.1
> ACTIVEMQ_BASE: /u/home/admin/work/activemq/build
> Loading message broker from: xbean:activemq.xml
> INFO  CollectionFactory              - JDK 1.4+ collections available
> INFO  XBeanXmlBeanDefinitionReader   - Loading XML bean definitions  
> from
> class path resource [activemq.xml]
> INFO  ClassPathXmlApplicationContext - Bean factory for application  
> context
> [org.apache.xbean.spring.context.ClassPathXmlApplicationContext;hashCo 
> de=14247437]:
> org.springframework.beans.factory.support.DefaultListableBeanFactory
> defining beans
> [org.springframework.beans.factory.config.PropertyPlaceholderConfigure 
> r,org.apache.activemq.xbean.XBeanBrokerService,remoteFactory];
> root of BeanFactory hierarchy
> INFO  ClassPathXmlApplicationContext - 3 beans defined in application
> context
> [org.apache.xbean.spring.context.ClassPathXmlApplicationContext;hashCo 
> de=14247437]
> INFO  ClassPathXmlApplicationContext - Unable to locate  
> MessageSource with
> name 'messageSource': using default
> [org.springframework.context.support.DelegatingMessageSource@9ffe3f]
> INFO  ClassPathXmlApplicationContext - Unable to locate
> ApplicationEventMulticaster with name  
> 'applicationEventMulticaster': using
> default
> [org.springframework.context.event.SimpleApplicationEventMulticaster@1 
> 8352d8]
> INFO  DefaultListableBeanFactory     - Pre-instantiating singletons in
> factory
> [org.springframework.beans.factory.support.DefaultListableBeanFactory
> defining beans
> [org.springframework.beans.factory.config.PropertyPlaceholderConfigure 
> r,org.apache.activemq.xbean.XBeanBrokerService,remoteFactory];
> root of BeanFactory hierarchy]
> INFO  BrokerService                  - ActiveMQ 4.1.1 JMS Message  
> Broker
> (ALERTQ) is starting
> INFO  BrokerService                  - For help or more information  
> please
> see: http://incubator.apache.org/activemq/
> INFO  JDBCPersistenceAdapter         - Database driver recognized:
> [apache_derby_embedded_jdbc_driver]
> INFO  DefaultDatabaseLocker          - Attempting to acquire the  
> exclusive
> lock to become the Master broker
> INFO  DefaultDatabaseLocker          - Becoming the master on  
> dataSource:
> org.apache.derby.jdbc.EmbeddedDataSource@8a1977
> INFO  JournalPersistenceAdapter      - Journal Recovery Started  
> from: Active
> Journal: using 5 x 20.0 Megs at:
> /etrade/home/mrodrig9/work/activemq/build/activemq-data/journal
> INFO  JournalPersistenceAdapter      - Journal Recovered: 0 message 
> (s) in
> transactions recovered.
> INFO  TransportServerThreadSupport   - Listening for connections at:
> tcp://someserver:31313
> INFO  TransportConnector             - Connector openwire Started
> INFO  ManagementContext              - JMX consoles can connect to
> service:jmx:rmi:///jndi/rmi://localhost:5099/jmxrmi
> Unable to load message catalog - mqji
> ERROR JmsQueueConnector              - Failed to initialize the  
> JMSConnector
> javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for
> '10.52.92.78:ALERTQ'
>         at
> com.ibm.mq.jms.services.ConfigEnvironment.newException 
> (ConfigEnvironment.java:546)
>         at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java: 
> 1137)
>         at com.ibm.mq.jms.MQConnection.createQMNonXA 
> (MQConnection.java:799)
>         at
> com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:255)
>         at
> com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:78)
>         at
> com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection 
> (MQQueueConnectionFactory.java:142)
>         at
> org.apache.activemq.network.jms.JmsQueueConnector.initializeForeignQue 
> ueConnection(JmsQueueConnector.java:216)
>         at
> org.apache.activemq.network.jms.JmsQueueConnector.init 
> (JmsQueueConnector.java:54)
>         at
> org.apache.activemq.network.jms.JmsConnector.start 
> (JmsConnector.java:114)
>         at
> org.apache.activemq.broker.BrokerService.startAllConnectors 
> (BrokerService.java:1494)
>         at
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:402)
>         at
> org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet 
> (XBeanBrokerService.java:47)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF 
> actory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF 
> actory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF 
> actory.createBean(AbstractAutowireCapableBeanFactory.java:420)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory 
> $1.getObject(AbstractBeanFactory.java:245)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry 
> .getSingleton(DefaultSingletonBeanRegistry.java:141)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean( 
> AbstractBeanFactory.java:242)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean( 
> AbstractBeanFactory.java:156)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.p 
> reInstantiateSingletons(DefaultListableBeanFactory.java:290)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh 
> (AbstractApplicationContext.java:348)
>         at
> org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>( 
> ClassPathXmlApplicationContext.java:161)
>         at
> org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>( 
> ClassPathXmlApplicationContext.java:51)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker 
> (XBeanBrokerFactory.java:41)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker 
> (BrokerFactory.java:57)
>         at
> org.apache.activemq.console.command.StartCommand.startBroker 
> (StartCommand.java:82)
>         at
> org.apache.activemq.console.command.StartCommand.runTask 
> (StartCommand.java:47)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute 
> (AbstractCommand.java:50)
>         at
> org.apache.activemq.console.command.ShellCommand.runTask 
> (ShellCommand.java:82)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute 
> (AbstractCommand.java:50)
>         at
> org.apache.activemq.console.command.ShellCommand.main 
> (ShellCommand.java:46)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.activemq.console.Main.runTaskClass(Main.java: 
> 202)
>         at org.apache.activemq.console.Main.main(Main.java:91)
> INFO  JmsConnector                   - JMS Connector Connector:0  
> Started
> INFO  BrokerService                  - ActiveMQ JMS Message Broker  
> (ALERTQ,
> ID:dev6m3-53031-1190315038649-1:0) started
> ERROR TransportConnector             - Could not accept connection  
> from
> /remoteIP:52978: java.io.IOException: Wire format negociation  
> timeout: peer
> did not send his wire format.
> java.io.IOException: Wire format negociation timeout: peer did not  
> send his
> wire format.
>         at
> org.apache.activemq.transport.WireFormatNegotiator.oneway 
> (WireFormatNegotiator.java:88)
>         at
> org.apache.activemq.transport.MutexTransport.oneway 
> (MutexTransport.java:47)
>         at
> org.apache.activemq.broker.TransportConnection.dispatch 
> (TransportConnection.java:1138)
>         at
> org.apache.activemq.broker.TransportConnection.processDispatch 
> (TransportConnection.java:805)
>         at
> org.apache.activemq.broker.TransportConnection.start 
> (TransportConnection.java:885)
>         at
> org.apache.activemq.broker.TransportConnector$1.onAccept 
> (TransportConnector.java:148)
>         at
> org.apache.activemq.transport.tcp.TcpTransportServer.run 
> (TcpTransportServer.java:167)
>         at java.lang.Thread.run(Thread.java:595)
>
> So here we see that activemq tries to connect to websphere MQ and  
> fails
> miserably and then every so often, WebsphereMQ tries to connect to  
> Activemq
> and falls down as well.
>
> Any help you can offer would be greatly appreciated.
> -- 
> View this message in context: http://www.nabble.com/ActiveMQ-JMS- 
> Bridge-to-Websphere-MQ-tf4489485s2354.html#a12803797
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

-- 
Daryl

"Don't worry about people stealing an idea. If it's original, you  
will have to ram it down their throats."
     -- Howard Aiken




Mime
View raw message