manifoldcf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wright <daddy...@gmail.com>
Subject Re: Transaction related Information
Date Tue, 23 Sep 2014 11:25:11 GMT
Hi Jitu,

To clarify further: you can create nested transactions ONLY where the
outer-level transaction is as weak or weaker than the inner-level
transaction.  Furthermore, you will almost certainly cause MCF performance
to suffer badly, as well as needing to handle back-off and retry situations.

In general, long transactions are a very bad idea anyhow, because they
force single-threadedness on the entire application. Connectors, to the
extent that they use database operations, are required to exit any
transactions they open before returning to their callers, AND they must not
leave any transactions open when they use any of the I*Activity methods.

There are almost always data-centric ways of structuring things so that
long-lived transactions are unneeded.  For example, you can introduce a
"context identifier" in your tables that will allow you to keep track of
what data is associated with what event.  Careful data design should be
sufficient to resolve your issue.  I can't say anything further because you
haven't provided any actual details as to what you are trying to do.

Thanks,
Karl


On Tue, Sep 23, 2014 at 6:28 AM, Karl Wright <daddywri@gmail.com> wrote:

> Hi Jitu,
>
> I'm afraid what you are trying to do will not work with the MCF
> architecture.  You will need to find another way.
>
> Karl
>
>
> On Tue, Sep 23, 2014 at 4:52 AM, Jitu <abjitu@gmail.com> wrote:
>
>> Hi,
>>    I have a requirement where on page submit i need to persist both job
>> and repository connection.  To maintain atomicity i added another level of
>> transaction at the top level. But i am getting
>> "org.apache.manifoldcf.core.interfaces.ManifoldCFException: Illegal lock
>> sequence: Write lock can't be within read lock or non-ex write lock" error.
>> when i debugged i noticed different transaction maintained in IDBInterface.
>> Please let me know when to use which transaction. i googled but did not
>> find sufficient information on below transaction levels.
>>
>> public static int TRANSACTION_ENCLOSING = 0;
>>   public static int TRANSACTION_READCOMMITTED = 1;
>>   public static int TRANSACTION_SERIALIZED = 2;
>>   public static int TRANSACTION_REPEATABLEREAD = 3;
>>
>> Basically first i am trying to persist repository connection and if i get
>> error while persisting job then it should roll back repository connection
>> which it persisted already.
>>
>> Thanks,
>> Jitu
>>
>
>

Mime
View raw message