In MQSeries 5.2, you could only use the XAConnectionFactory if you configured the MQSeries JMS API to use 'bindings mode' instead of 'client mode'. The upshot of this is that the MQSeries Queue Manager and your Application Server needed to be on the same box, because bindings mode uses shared memory to communicate.
Rgds, Dan. -- Danny Yates -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 08 June 2003 08:07 To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] JBoss XA transaction with WebSphere MQ Thanks for the reply. I am working on a complete readme to configure WebSphere MQ in JBoss. I will submit it as a patch once I am done, no problem. I am not sure to understand what you are referring to when talking about JNDI. If this is about bringing the WebSphere MQ queue/topic and connection factory object in the JBoss namespace, I actually wrote my own custom MBeans, wrapped them in a sar file and deploy it. The nice thing about it is that I have a jboss-service.xml in the sar which is similar to the jbossmq-destinations file and which allows me to declare as many WSMQ object as I need. The <xa-connection>false</xa-connection> is something that I have to do to have a WS MQ MDB working. I am not able to make the XA connection factory of WS MQ working. If I try to use it, the MDB never receives any messages, I am not sure to know why yet. Any suggestions at what I might need to look at? The MDB gets deployed without any errors; my client application is sending the message fine (I can see them in the WSMQ queue through the WSMQ admin tool), but the MDB never receives them. I think something wrong is happening because JBoss does not shutdown properly after that. It hangs in the stopping of the MDB, I think. I managed to create a new JMS resource adapter as you suggested. It seems to work fine. I need to check if I can send a message to a JBoss and a WSMQ queue using my two resource adapters but all in one transaction. I did experience some problems if I change the following value in my new JMS resource adapter: <adapter-display-name>JMS Adapter</adapter-display-name> If it is not set to "JMS Adapter", then JBoss complains about the deployment being incomplete because of some dependencies with ConnectionManager and pool (or something like that. I can try to find the exact message if needed). Any ideas why? Thanks again for the help. Thomas -----Original Message----- From: Adrian Brock [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 8:07 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] JBoss XA transaction with WebSphere MQ Hi Thomas, Sounds like you have it nearly correct. If you can post the working configuration as a patch at www.sf.net/projects/jboss I will include them in docs/examples/jms, I don't have MQSeries so I can't test it. For JNDI you have three options. 1) Bind the external context into jboss's jndi 2 Use the following attribute in the provider config <attribute name="ProviderUrl">whatever</ProviderUrl> 3) Write your own provider adapter Re: <xa-connection>false</xa-connection> You will need to specify this when the connection factory you chose in the JMS provider is not an XAConnectionFactory. Re: JMS resource adapter You don't need to change ra.xml, these are just default values. If you want a new JMS resource adapter, you should make a new configuration (just like when you make a new data source). You can specify the provider adapter as a property on the connection manager. 3.2 style - 3.0 is too long winded :-) but the idea is the same. <!-- JMS XA Resource adapter, use this to get transacted JMS in beans --> <tx-connection-factory> <jndi-name>MQJmsXA</jndi-name> <xa-transaction/> <adapter-display-name>MQ JMS Adapter</adapter-display-name> <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:MQJMSProvider</config-property> <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property> <security-domain-and-application>JmsXARealm</security-domain-and-applica tion> </tx-connection-factory> Regards, Adrian xxxxxxxxxxxxxxxxxxxxxxxx Adrian Brock Director of Support Back Office JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 06 June 2003 05:59 To: [EMAIL PROTECTED] Subject: [JBoss-user] JBoss XA transaction with WebSphere MQ I have been playing with JBoss 3.0.5 and WebSphere MQ 5.3 (ex-MQSeries) for a while now. I managed to create a new JMS provider in JBoss for WebSphere MQ: In jms-service.xml, duplicate the org.jboss.jms.jndi.JMSProviderLoader mbean. Change the ProviderName to WebSphereMQJMSProvider, change the QueueFactoryRef to WSMQConnectionFactory (I also changed the TopicFactoryRef to WSMQConnectionFactory, but I did not play with topics). I am passing the details on how to add the WSMQConnectionFactory to the JBoss JNDI space. I managed to create a new configuration for MDB listening to WS MQ: In standardjboss.xml, duplicate the Standard Message Driven Bean container configuration. Change the name Standard Message Driven Bean to WebSphere MQ Message Driven Bean and set the JMSProviderAdapterJNDI to WebSphereMQJMSProvider (same as ProviderName in jms-service.xml). After that, I can have two types of MDBs. One listening to a JBoss queue and one listening to WS MQ queue. My ultimate goal is to have an MDB listening to a queue X and forward each received messages to a queue Y. I want X to be a JBoss queue or a WS MQ queue. I want Y to be a JBoss queue or a WS MQ queue. I want the reading and forwarding of the message to be done within the same transaction. If X and Y are JBoss queues, no problem (container transaction-type in the MDB ejb-jar.xml and java:/JmsXA for Y connection factory). If X is a JBoss queue and Y is a WS MQ queue, I also manage to make it work but with a little more pain: - I had to change the JmsProviderAdapterJNDI config property value in the ra.xml of the jms-ra.rar (the JMS resource adapter for XA) in order to point to my WebSphereMQJMSProvider. - I had to tweak the JAAS settings of the JMS XA resource adapter in jms-service.xml (WS MQ did not like the default guest/guest user/password used when creating the JMS session) I have two concerns for this specific case: - Is there a simpler way to do that or is it THE way to do it? - Let's imagine that I want to forward the message to a second queue - Z - which is not a WS MQ queue. How do I do that since the JMS XA resource adapter seems to work with only one specific connection factory? Finally, as soon as X is a WS MQ, then the messages are never delivered to my MDB. I am not sure to know why, I am still looking into it. It is really linked to the XA piece (if I use the non XA connection factory of WS MQ and I use <xa-connection>false</xa-connection> in my jboss.xml of the MDB, it is working fine. Is there anything that I am missing in the MDB configuration when it is used in an XA context? Something similar to what I had to do for the JMS XA resource adapter? Any pointers or suggestions on any of those points will be really appreciated. Thomas ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user _____________________________________________________________________ Notice to recipient: The information in this internet e-mail and any attachments is confidential and may be privileged. It is intended solely for the addressee. If you are not the intended addressee please notify the sender immediately by telephone. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to external clients any opinions or advice contained in this internet e-mail are subject to the terms and conditions expressed in any applicable governing terms of business or client engagement letter issued by the pertinent Bank of America group entity. If this email originates from the U.K. please note that Bank of America, N.A., London Branch, Banc of America Securities Limited and Banc of America Futures Incorporated are regulated by the Financial Services Authority. _____________________________________________________________________ ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user