Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Non XA Driver in a distributed environment - What is the Best Practice?

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guru's

We are using Weblogic 8.1 with sybase, and are using Sybase JConnect driver to connect to database. JConnect is a non XA compliant driver, so we are using the "Emulating Two-Phase Commit" feature that weblogic offers. It is not really much as weblogic clearly states that:

<quote>
When the Emulate Two-Phase Commit for non-XA Driver option is selected (EnableTwoPhaseCommit is set to true), the non-XA JDBC resource always returns XA_OK during the XAResource.prepare() method call. The resource attempts to commit or roll back its local transaction in response to subsequent XAResource.commit() or XAResource.rollback() calls. If the resource commit or rollback fails, a heuristic error results. Application data may be left in an inconsistent state as a result of a heuristic failure.
</quote>

My question is - is there a best practice to manage a distributed transaction is such a scenario. In my specific case, I have to make updates across to sybase servers, and send out a JMS message, all in one transaction. Any ideas how best to satisfy transactionality in this case while still letting the container manage majority of the work? Any pattern?

I have one idea on this. Not much, in fact quite dirty. I will share it later, don't want to pollute your minds right now!

Thanx for reading.

Regards
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need an XA driver. Why can't you use Sybase jConnect 5.5/XA Driver.
 
Sanjeev Verma
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are using Sybase 11.9, which does not support XA. And lets just say the environment is not in my hands, I cannot change it on my free will .

Any ideas?
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't think of some dirty hack, you will regret it.

You cannot remain on old versions of software forever, so your requirement for an XA-compliant version of Sybase should be the push to get the upgrade.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic