I have a complex process that is designed to be transactional, and is coded to be tranactional with Spring annotations. When I run it against databases that have XA aware drivers, it works well (apart from the headache of setting up each RDBMS to support XA).
However, I am trying to hook it up to HAWQ. HAWQ is XA aware to the point that it says, essentially, "Whoa Nellie, I don't do XA yet." Since I am likely to run into other backing stores that have similar limitations, the exact exception is not important, only the concept that I need to support non-XA datastores in what is normally an XA context, within certain very coarse limits.
The process is structured so that XA is a valuable luxury, but transactional failures that are not captured in the XA scope are non-critical.
For the class that talks to HAWQ (or classes that touch other future non-XA systems), is there a way to annotate the method to say "I know the caller is transactional, but I am not."?
I have already reviewed How to exclude a method to be @Transactional?, but it is solving a different problem.
class CallingClass
{
@Transactional
callingMethod ()
{
doSomeSetup ();
methodFromWorkerClass();
}
}
class NormalWorkerClass() implements Worker
{
methodFromWorkerClass ()
{
doSomeStuff();
}
}
class NonXAClass() implements Worker
{
@INeedToBeNonXA
methodFromWorkerClass ()
{
doSomeStuff();
}
}