« Return to Thread: WebSphere Integration

WebSphere Integration

by Meunier Pierre-Emmanuel :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi

 

I’ve been trying to integrate Mule with WebSphere (in my case v6 and now v6.1) and I’ve never managed to have it “fully” working. Here is what I mean by “fully”.

 

I use WebSphere MQ as a JMS provider and I have to use XA transactions. Mule is currently running as a webapp in WebSphere but:

 

1) it is using JBossTS as the transaction manager.

2) it is creating its own connection factory to WebSphere MQ.

 

1- I’d like to use the WebSphere Transaction Manager provided by Mule but it doesn’t work. Here is what IBM had to say about the error I was receiving when trying the WebSphere TM:

 

The reason that this failing is because of the way WebSphere Transaction
manager is architected. The stack call above on page 5:                 
com.ibm.ws.Transaction.JTA.TransactionImpl.enlistResource               
can only be used to enlist a 1PC resource. This is why the exception    
occurs - Mule ESB is trying to register a 2pc resource.                 
                                                                        
The correct procedure to enlist a 2pc resource for WebSphere is first to
call registerResourceInfo() on the TransactionManager which will return 
an integer which represents the recoverable resource. This integer is   
then passed back to TransactionImpl in a call to enlistResource as      
follows:                                                                
                                                                        
enlistResource(XAResource xaRes, int recoveryIndex)                     
                                                                        
The call to registerResourceInfo takes the following parameters:        
                                                                        
registerResourceInfo(String xaResFactoryClassName, XAResourceInfo       
xaResInfo)                                                              
                                                                        
or                                                                      
                                                                        
registerResourceInfo(String xaResFactoryClassName, XAResourceInfo       
xaResInfo, String[] xaResInfoClasspath)                                 
                                                                        
if specific classpath information is needed for recovery purposes.      
These changes should be made by the Mule ESB product.

 

2 - I also would like to lookup the ConnectionFactory from JNDI instead of creating it with a spring bean in the Mule config but when trying to do that I receive the following exception:

 

Caused by: org.mule.api.model.ModelException: Failed to connect listener XaTransactedJmsMessageReceiver{this=5bbc5bbc, receiverKey=Test~IN.QUEUE, endpoint=jms://IN.QUEUE} for endpoint endpoint.jms.IN.QUEUE

            at org.mule.service.AbstractService.connectListeners(AbstractService.java:700)

            at org.mule.service.AbstractService.start(AbstractService.java:324)

            at org.mule.service.AbstractService.start(AbstractService.java:293)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)

            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

            at java.lang.reflect.Method.invoke(Method.java:618)

            at org.mule.lifecycle.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:263)

            ... 53 more

Caused by: org.mule.transport.FatalConnectException: ReconnectStrategy "org.mule.transport.SingleAttemptConnectionStrategy" failed to reconnect receiver on endpoint "jms://IN.QUEUE"

            at org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:29)

            at org.mule.transport.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:108)

            at org.mule.transport.AbstractMessageReceiver.connect(AbstractMessageReceiver.java:427)

            at org.mule.service.AbstractService.connectListeners(AbstractService.java:696)

            ... 60 more

Caused by: org.mule.transport.ConnectException: Initialisation Failure: com.ibm.ejs.jms.JMSSessionHandle incompatible with org.mule.transaction.XaTransaction$MuleXaObject

            at org.mule.transport.AbstractMessageReceiver.connect(AbstractMessageReceiver.java:459)

            at org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25)

            ... 63 more

Caused by: java.lang.ClassCastException: com.ibm.ejs.jms.JMSSessionHandle incompatible with org.mule.transaction.XaTransaction$MuleXaObject

            at org.mule.transport.jms.XaTransactedJmsMessageReceiver.createConsumer(XaTransactedJmsMessageReceiver.java:329)

            at org.mule.transport.jms.XaTransactedJmsMessageReceiver.doConnect(XaTransactedJmsMessageReceiver.java:143)

            at org.mule.transport.AbstractMessageReceiver.connect(AbstractMessageReceiver.java:438)

            ... 64 more

 

The reason for all this is that WAS and MQ integrates very well and I’d like to take advantage of that. I’d like Mule to be deployed with the JCA Connector

 

 

I think all mule and websphere users would really (and I mean REALLY) appreciate to have the WebSphereIntegration wiki page (http://www.mulesource.org/display/MULE2USER/WebSphere+Integration) finally updated similarly to the JBoss Integration page (http://www.mulesource.org/display/MULE2USER/JBoss+Integration). That would help a lot!

 

I will carry on trying and give updates when I find something new but any help from the Mule developers would be really appreciated (if a Mule developer could actually try to deploy Mule connector in WebSphere 6.1 that’d be a good start…)

 

Thanks a lot

 

Pierre

 

 

 

************************************************************************
DISCLAIMER
The information contained in this e-mail is confidential and is intended
for the recipient only.
If you have received it in error, please notify us immediately by reply
e-mail and then delete it from your system. Please do not copy it or
use it for any other purposes, or disclose the content of the e-mail
to any other person or store or copy the information in any medium.
The views contained in this e-mail are those of the author and not
necessarily those of Admenta UK Group.
 
Admenta UK plc is a company incorporated in England and Wales
under company number 3011757 and whose registered office
is at Sapphire Court, Walsgrave Triangle, Coventry CV2 2TX
************************************************************************
 

 « Return to Thread: WebSphere Integration