Well, as much as I'd like to just tell you how bad of an idea that is, I'll tell you how to do this... :-)

My recommendation would be to have two SqlMapClient instances....and two SqlMapConfig.xml files (one configured for global, one for local).

Switching between the two would simply mean using the appropriate instance. 

That's the safest way to do it.

Cheers,
Clinton

On 10/20/05, Abdullah Kauchali <[EMAIL PROTECTED]> wrote:
(Been out of the loop for a while ... so apologies for stupid question.)

Is it possible to switch the transactional properties from local to global
at runtime?

Are there any good examples I can use?

I am aware that the SqlMapClient, when created, relates to one of the
following transactional types:

1)  Local
2)  Global (JTA)
3)  External (???)

Basically, what we're trying to do is create the ability to weave method
calls at runtime.  Suppose we have two methods that update database 1.
This operates with a local transaction manager.

Now, at runtime, we can weave a third method (which updates database 2)
along with the first two - but we still want transactional support (this
time
obviously across the two databases!).

So, we want to switch from local to global at runtime.

Any ideas how we can achieve this?

Many thanks in advance & kind regards,

Abdullah

Reply via email to