[infinispan-dev] configuring transactional caches

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[infinispan-dev] configuring transactional caches

Mircea Markus
Hi,

ATM a cache is marked as transactional by setting the transactionalManagerLookup, transactionalManagerLookupClass or enable batching.
This is a bit hard to explain/clumsy and also doesn't work well with the xml config: if one wants the default cache to be transactional and a named cache not to be, it would have to specify an empty transactionManagerLookup attribute - not nice.

So an alternative would be to have an explicit "isTransactional" configuration.
One way to do it is to add a "mode" attribute under the transactional element:
<transaction mode="NON_TRANSACTIONAL | TRANSACTIONAL_SYNCHRONIZED | TRANSACTIONAL_FULL_XA | TRANSACTIONAL_XA_NO_RECOVERY" />  
Somehow similar to the clustering element's mode attribute.

Pete is there an JSR-107 for the above enum? I looked for it in both the spec and API but couldn't find one...

How does this sound?


Cheers,
Mircea


 
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] configuring transactional caches

Sanne Grinovero-3
That sounds nice.

Where Is the transactionalManagerLookup going to be defined? There was
a Hibernate Search user who needed batching and no transactions on a
cache, and the JBossTM on other caches, so he ended up explicitly
wiring the Lucene cache to the DummyTM using the
transactionalManagerLookup.

Since I don't see why someone would like to use different TMs for
different caches, other than in that case, maybe we could
1) make the transactionalManagerLookup a global section option to be
applied to all caches.
2) The combination NON_TRANSACTIONAL + Batching should NOT use the
same global TM but always look for the Dummy implementation.

Sanne


On 12 September 2011 16:40, Mircea Markus <[hidden email]> wrote:

> Hi,
>
> ATM a cache is marked as transactional by setting the transactionalManagerLookup, transactionalManagerLookupClass or enable batching.
> This is a bit hard to explain/clumsy and also doesn't work well with the xml config: if one wants the default cache to be transactional and a named cache not to be, it would have to specify an empty transactionManagerLookup attribute - not nice.
>
> So an alternative would be to have an explicit "isTransactional" configuration.
> One way to do it is to add a "mode" attribute under the transactional element:
> <transaction mode="NON_TRANSACTIONAL | TRANSACTIONAL_SYNCHRONIZED | TRANSACTIONAL_FULL_XA | TRANSACTIONAL_XA_NO_RECOVERY" />
> Somehow similar to the clustering element's mode attribute.
>
> Pete is there an JSR-107 for the above enum? I looked for it in both the spec and API but couldn't find one...
>
> How does this sound?
>
>
> Cheers,
> Mircea
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] configuring transactional caches

Pete Muir
In reply to this post by Mircea Markus
This area currently under discussion in JSR-107.

https://github.com/jsr107/jsr107spec/issues/16

Perhaps you should raise this on the same issue as a related config issue?

I'm happy with the above regarding the config changes.

On 12 Sep 2011, at 10:40, Mircea Markus wrote:

> Hi,
>
> ATM a cache is marked as transactional by setting the transactionalManagerLookup, transactionalManagerLookupClass or enable batching.
> This is a bit hard to explain/clumsy and also doesn't work well with the xml config: if one wants the default cache to be transactional and a named cache not to be, it would have to specify an empty transactionManagerLookup attribute - not nice.
>
> So an alternative would be to have an explicit "isTransactional" configuration.
> One way to do it is to add a "mode" attribute under the transactional element:
> <transaction mode="NON_TRANSACTIONAL | TRANSACTIONAL_SYNCHRONIZED | TRANSACTIONAL_FULL_XA | TRANSACTIONAL_XA_NO_RECOVERY" />  
> Somehow similar to the clustering element's mode attribute.
>
> Pete is there an JSR-107 for the above enum? I looked for it in both the spec and API but couldn't find one...
>
> How does this sound?
>
>
> Cheers,
> Mircea
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] configuring transactional caches

Mircea Markus
In reply to this post by Sanne Grinovero-3

On 12 Sep 2011, at 16:06, Sanne Grinovero wrote:

> That sounds nice.
>
> Where Is the transactionalManagerLookup going to be defined? There was
> a Hibernate Search user who needed batching and no transactions on a
> cache, and the JBossTM on other caches, so he ended up explicitly
> wiring the Lucene cache to the DummyTM using the
> transactionalManagerLookup.
>
> Since I don't see why someone would like to use different TMs for
> different caches, other than in that case, maybe we could
> 1) make the transactionalManagerLookup a global section option to be
> applied to all caches.

That's possible today with the current config approach: just set a TML on the default cache and don't override it in any other config.
> 2) The combination NON_TRANSACTIONAL + Batching should NOT use the
> same global TM but always look for the Dummy implementation.
+1

>
> Sanne
>
>
> On 12 September 2011 16:40, Mircea Markus <[hidden email]> wrote:
>> Hi,
>>
>> ATM a cache is marked as transactional by setting the transactionalManagerLookup, transactionalManagerLookupClass or enable batching.
>> This is a bit hard to explain/clumsy and also doesn't work well with the xml config: if one wants the default cache to be transactional and a named cache not to be, it would have to specify an empty transactionManagerLookup attribute - not nice.
>>
>> So an alternative would be to have an explicit "isTransactional" configuration.
>> One way to do it is to add a "mode" attribute under the transactional element:
>> <transaction mode="NON_TRANSACTIONAL | TRANSACTIONAL_SYNCHRONIZED | TRANSACTIONAL_FULL_XA | TRANSACTIONAL_XA_NO_RECOVERY" />
>> Somehow similar to the clustering element's mode attribute.
>>
>> Pete is there an JSR-107 for the above enum? I looked for it in both the spec and API but couldn't find one...
>>
>> How does this sound?
>>
>>
>> Cheers,
>> Mircea
>>
>>
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] configuring transactional caches

Mircea Markus
In reply to this post by Pete Muir
Thank you!

On 12 Sep 2011, at 16:09, Pete Muir wrote:

> This area currently under discussion in JSR-107.
>
> https://github.com/jsr107/jsr107spec/issues/16
>
> Perhaps you should raise this on the same issue as a related config issue?
someone else was quicker :)

_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev