File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

weblogic MqSeries Bridge

 
Sridhar Srikanthan
Ranch Hand
Posts: 366
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
Has anyone worked on bridging the Weblogic JMS Provider with MQSeries JMS provider through a WL Messagin Bridge? If yes, have you encountered any problems with the transaction manager( weblogic container) ?
I have a problem in implementing container managed transactions on an MDB in WLS because MQSeries doesnt seem to support two-phase commit. Any inputs on this issue will be highly appreciated.
Thanks
Sridhar
 
Navjeet Nehra
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am working with the WLS and MQ using the Foreign JMS Provider mapping, Haven't had any issues regarding the transaction manager. Can you elaborate on your setup and the actual problems ?
regards
Originally posted by Sridhar Sri:
Hello Friends,
Has anyone worked on bridging the Weblogic JMS Provider with MQSeries JMS provider through a WL Messagin Bridge? If yes, have you encountered any problems with the transaction manager( weblogic container) ?
I have a problem in implementing container managed transactions on an MDB in WLS because MQSeries doesnt seem to support two-phase commit. Any inputs on this issue will be highly appreciated.
Thanks
Sridhar
 
Sridhar Srikanthan
Ranch Hand
Posts: 366
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Navjeet,
Thanks for the reply. We have withdrawn the idea of implementing a bridge. We have infact configured the setup using the Foreign JMS Provider option.
We have been able to implement XA but have some issues. I will be grateful to you if u can offer your valuable advice on those.
1) When we receive a bad message ( can be just a formatting issues or a poison message), we are using messageDrivenContextInstance.setRollBackOnly().
The problem is we are unable to set any redelivery limit or error destination as there are no options in admin console. There must be some way to do it but I am not sure where to get the documentation from.
2) This issue involves the consumer processing when a required resource for the transaction is not available ( like a database). How do u go around the problem of resetting the message to be redelivered again after a small interval ?
Thanks in advance
Sridhar
 
Ashish Pagare
Ranch Hand
Posts: 101
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sridhar,
Here's what you can u do.
You can specify the Redelivery Delay and Redelivery Limit at the ConnectionFactory level in WL console. You can also override these values at a session level but then you have to use weblogic extension apis. If because of an error scenario the message roll backs to a error destination you can specify the redelivery delay at that destination level. By all means applied, WL will redeliver the message.
You can specify ErrorDestination property for each queue/topic and all your rollbacked message will redirect to this queue then you can configure the redelivery delay on this error destination.
Not sure which version of WL you are using. I am specifying some of the features which may be available only in WL 7.1 and higher.
 
Sridhar Srikanthan
Ranch Hand
Posts: 366
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ashish,
Thanks for the reply. I am presently using WLS 8.1. I understand what you are suggesting. But our scenario is a bit different. We have configured a foreign JMS Server with a local jndi name pointing to remote jndi connection factory( This is a new feature available with WLS8.1). This setup in admin console doesnt have options to set redelivery limit and error destination. (If we set up a local jndi connection factory, we can use the options on the admin console to set redelivery)
If you dont understand my problem, i can be more specific
Thanks
Sridhar
[ November 18, 2003: Message edited by: Sridhar Sri ]
 
Navjeet Nehra
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sridhar,
Assuming you are using JMS there is a JMS header property called "JMSXDeliveryCount" which contains the number of times the message has been redelivered. This contains mq "BackoutCount" which can be used to set the redelivery limit.
Also the way we have found around is when the messages rollback due to XA errors put them in a suspend queue and reprocess them later when the resources are available.
In case you want to look up Java/Mq documentation use the following - Websphere MQ using Java - csqzaw11.pdf
Hope it helps
Navjeet
 
Ashish Pagare
Ranch Hand
Posts: 101
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well said Navjeet.
That's exactly the way we are using. All error handling is done using the JMS/MQ api's and we do not have anything specific to weblogic.
What we have is: Client application put request message in a MQ queue and we have binded MQ queues to corresponding JMS (logical) queues. Our application (running in weblogic) used IBM JMS api's to pick the message from the queue and first checks the "JMSXDeliveryCount" property of the request JMSMessage to see if it is been delievered second time. If its a fresh message then on any exception occurence, the message rollbacks to the original mq queue and been delievred back on the arrival of a fresh message at this moment the rollbacked message will have JMSXDeliveryCount count of 2 and we put this msg in our error queue, which is constantly monitored to inform the operations team.
There is more to the story but I guess I can cut it short for now.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic