cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Hair <>
Subject Re: TransactionContextInterceptor Keeps Releasing My Lock
Date Mon, 26 Oct 2015 11:53:45 GMT
I have narrowed it down to multithreading being the cause. I have a set of
workers running through an executor service, and it seems cglib is not
respecting the @DB annotation on the method being called by the thread.

I can force the lock to be acquired if the entire method is executed in a
transaction, or if I remove the producer-consumer BlockingQueue. Is there a
way that makes sense besides one of these two options?

On Wed, Oct 14, 2015 at 5:04 PM, Jeff Hair <> wrote:

> I'm using the DAO API to create a lock in the lock table as per
> However, the lock seems to mysteriously vanish after acquireInLockTable or
> lockInLockTable method returns. Looking at the code, I've discovered that
> TransactionContextInterceptor is closing the TransactionLegacy after the
> method returns.
> I have @DB on the method calling acquireFromLockTable. What am I doing
> wrong?

*Jeff Hair*
Technical Lead and Software Developer

Tel: (+354) 415 0200

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message