ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vivek_ <vivek.parantha...@bizruntime.com>
Subject Re: ignite 1.6.0 with jta global transaction
Date Wed, 06 Jul 2016 04:35:36 GMT
Denis,

Suppose, If I am configuring it as above, the userTransactionManager should
be available even before start.
Consider: if I am in Global distributed transaction. for any operation from
the beginning.. So in between lets assume it flows to the above snipet.
                yes in this case it is true that it falls under
transaction, lets assume one more concurrent processing takes place(2nd
request). In that case also, the Ignite will start again...!
This will make troubles in performance, as it starts Ignite again and again.

On Tue, Jul 5, 2016 at 8:39 PM, Denis Magda [via Apache Ignite Users] <
ml-node+s70518n6119h72@n6.nabble.com> wrote:

> Well, after that you can use Ignite’s cache related operation inside of an
> existed UserTransaction as the example in the provided link shows. If JTA
> transaction is started, Ignite will also start a transaction and will
> enlist it into JTA transaction using it's own internal implementation of
> XAResource.
>
> Sorry, but I don’t get why the above approach doesn’t work for you and
> what you mean saying it’s not possible to use it. What do you observe? How
> the full code snippet that should work but doesn’t work looks like? What is
> the configuration of the cache which operations must be enlisted in JTA
> transaction (check that the cache is transactional)?
>
> —
> Denis
>
> On Jul 5, 2016, at 3:49 PM, Vivek_ <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=6119&i=0>> wrote:
>
> Code is like this,
>
> TransactionConfiguration transactionConfiguration = new TransactionConfiguration();
>   Factory factory = FactoryBuilder.factoryOf(userTransactionManager);
>        transactionConfiguration.setTxManagerFactory(factory);
>        transactionConfiguration.setUseJtaSynchronization(true);
> IgniteConfiguration cfg = new IgniteConfiguration();
> cfg.setTransactionConfiguration(transactionConfiguration);Ignite ignite = Ignition.start(cfg);
>
> Here my need is, Start only once, then get the instance , from instance, get xa resource,
enlist to UserTransaction... somthing like this..
>
>
>
> On Tue, Jul 5, 2016 at 6:01 PM, Denis Magda [via Apache Ignite Users] <<a
> href="x-msg://41/user/SendEmail.jtp?type=node&amp;node=6115&amp;i=0"
> target="_top" rel="nofollow" link="external" class="">[hidden email]>
> wrote:
>
>> How does your code looks like? What is your configuration? What kind of
>> exception did you get?
>>
>> —
>> Denis
>>
>> On Jul 5, 2016, at 3:26 PM, Vivek_ <[hidden email]
>> <http://user/SendEmail.jtp?type=node&node=6112&i=0>> wrote:
>>
>> Denis, I have tried it, and is not possible if we have started Ignite,
>> and then enlist the jta
>>
>> On Tue, Jul 5, 2016 at 5:53 PM, Denis Magda [via Apache Ignite Users] <<a
>> href="<a
>> href="x-msg://34/user/SendEmail.jtp?type=node&amp;amp;node=6110&amp;amp;i=0"
>> class="">x-msg://34/user/SendEmail.jtp?type=node&amp;node=6110&amp;i=0"
>> target="_top" rel="nofollow" link="external" class="">[hidden email]>
>> wrote:
>>
>>> You can easily make an Ignite transaction (or Ignite cache operations)
>>> as a part of global JTA transaction. Refer to this section for more details
>>>
>>> https://apacheignite.readme.io/v1.6/docs/transactions#integration-with-jta
>>>
>>> —
>>> Denis
>>>
>>> On Jul 5, 2016, at 3:06 PM, Vivek_ <[hidden email]
>>> <http://user/SendEmail.jtp?type=node&node=6109&i=0>> wrote:
>>>
>>> which means, can we do it after starting the Ignite also, or even before
>>> the Start of the Ignite..?
>>>
>>> On Sun, Jul 3, 2016 at 7:07 AM, shibaevv [via Apache Ignite Users] <<a
>>> href="<a href="<a
>>> href="x-msg://33/user/SendEmail.jtp?type=node&amp;amp;amp;node=6104&amp;amp;amp;i=0"
>>> class="">x-msg://33/user/SendEmail.jtp?type=node&amp;amp;node=6104&amp;amp;i=0"
>>> class=""><a
>>> href="x-msg://33/user/SendEmail.jtp?type=node&amp;amp;node=6104&amp;amp;i=0"
>>> class="">x-msg://33/user/SendEmail.jtp?type=node&amp;node=6104&amp;i=0"
>>> target="_top" rel="nofollow" link="external" class="">[hidden email]>
>>> wrote:
>>>
>>>> Technically you do not have to use ignite transaction as xa-resource.
>>>> Few months ago we requested from ignite team to implement feature we
>>>> found in infinispan "hibernate.cache.infinispan.use_synchronization" and
>>>> they done it in version 5.x, see useJtaSynchronization="true":
>>>>
>>>>     <bean id="gridCfg"
>>>> class="org.apache.ignite.configuration.IgniteConfiguration"
>>>>         p:gridName                          = "myGrid">
>>>>         <property name="transactionConfiguration">
>>>>             <bean
>>>> class="org.apache.ignite.configuration.TransactionConfiguration"
>>>>                 p:defaultTxConcurrency="OPTIMISTIC"
>>>>                 p:defaultTxIsolation="REPEATABLE_READ"
>>>>                 p:useJtaSynchronization="true">
>>>>                 <property name="txManagerFactory">
>>>>                     <bean
>>>> class="org.apache.ignite.cache.jta.jndi.CacheJndiTmFactory">
>>>>                         <property name="jndiNames">
>>>>                             <util:constant
>>>> static-field="org.springframework.transaction.jta.JtaTransactionManager.FALLBACK_TRANSACTION_MANAGER_NAMES"
>>>> />
>>>>                         </property>
>>>>                     </bean>
>>>>                 </property>
>>>>             </bean>
>>>>         </property>
>>>>     </bean>
>>>>
>>>> ------------------------------
>>>> If you reply to this email, your message will be added to the
>>>> discussion below:
>>>>
>>>> http://apache-ignite-users.70518.x6.nabble.com/ignite-1-6-0-with-jta-global-transaction-tp6054p6058.html
>>>> To unsubscribe from ignite 1.6.0 with jta global transaction, click
>>>> here.
>>>> NAML
>>>> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>>
>>>
>>>
>>> ------------------------------
>>> View this message in context: Re: ignite 1.6.0 with jta global
>>> transaction
>>> <http://apache-ignite-users.70518.x6.nabble.com/ignite-1-6-0-with-jta-global-transaction-tp6054p6104.html>
>>> Sent from the Apache Ignite Users mailing list archive
>>> <http://apache-ignite-users.70518.x6.nabble.com/> at Nabble.com
>>> <http://nabble.com/>.
>>>
>>>
>>>
>>>
>>> ------------------------------
>>> If you reply to this email, your message will be added to the discussion
>>> below:
>>>
>>> http://apache-ignite-users.70518.x6.nabble.com/ignite-1-6-0-with-jta-global-transaction-tp6054p6109.html
>>> To unsubscribe from ignite 1.6.0 with jta global transaction, click here
>>> .
>>> NAML
>>> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>
>>
>> ------------------------------
>> View this message in context: Re: ignite 1.6.0 with jta global
>> transaction
>> <http://apache-ignite-users.70518.x6.nabble.com/ignite-1-6-0-with-jta-global-transaction-tp6054p6110.html>
>> Sent from the Apache Ignite Users mailing list archive
>> <http://apache-ignite-users.70518.x6.nabble.com/> at Nabble.com
>> <http://nabble.com/>.
>>
>>
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://apache-ignite-users.70518.x6.nabble.com/ignite-1-6-0-with-jta-global-transaction-tp6054p6112.html
>> To unsubscribe from ignite 1.6.0 with jta global transaction, click here.
>> NAML
>> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> ------------------------------
> View this message in context: Re: ignite 1.6.0 with jta global transaction
> <http://apache-ignite-users.70518.x6.nabble.com/ignite-1-6-0-with-jta-global-transaction-tp6054p6115.html>
> Sent from the Apache Ignite Users mailing list archive
> <http://apache-ignite-users.70518.x6.nabble.com/> at Nabble.com
> <http://nabble.com/>.
>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-ignite-users.70518.x6.nabble.com/ignite-1-6-0-with-jta-global-transaction-tp6054p6119.html
> To unsubscribe from ignite 1.6.0 with jta global transaction, click here
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6054&code=dml2ZWsucGFyYW50aGFtYW5AYml6cnVudGltZS5jb218NjA1NHwtOTAxMTY3MTEw>
> .
> NAML
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ignite-1-6-0-with-jta-global-transaction-tp6054p6123.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Mime
View raw message