You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Amir Akhmedov <am...@gmail.com> on 2018/01/29 18:35:22 UTC

Re: No transaction is currently active || Not allowed to create transaction on shared EntityManager - use Spring transactions or EJB CMT instead

Also, please make sure you registered Ignite's Spring Transaction Manager.
As an example for Ignite and Spring Transaction you can check
https://github.com/apache/ignite/tree/master/modules/spring/src/test/java/org/apache/ignite/transactions/spring

Thanks,
Amir

On Mon, Jan 29, 2018 at 9:38 AM, ezhuravlev <e....@gmail.com>
wrote:

> Hi,
>
> I think now you need to start and commit transaction manually in your code:
>                     em.getTransaction().begin();
>                     em.getTransaction().commit();
>
> At least I've tried it some time ago and it worked. Please check this
> example on github:
> https://github.com/ezhuravl/ignite-eclipselink-example
>
> Evgenii
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Sincerely Yours Amir Akhmedov

Re: No transaction is currently active || Not allowed to create transaction on shared EntityManager - use Spring transactions or EJB CMT instead

Posted by Evgenii Zhuravlev <e....@gmail.com>.
Unfortunately, there is more than one file and it will look unreadable
here. All code can be accessed on github via the link I've provided earlier.

Evgenii

2018-01-30 7:10 GMT+03:00 Amir Akhmedov <am...@gmail.com>:

> You need to register a bean as follow
>
> <bean id="transactionManager" class="org.apache.ignite.transactions.spring.SpringTransactionManager">
>         <property name="transactionConcurrency" value="OPTIMISTIC"/>
>         <property name="igniteInstanceName" value="testGrid"/>
> </bean>
>
>
> Please check the link a sent you earlier it has tests with all required configurations. It can serve as a good example.
>
>

Re: No transaction is currently active || Not allowed to create transaction on shared EntityManager - use Spring transactions or EJB CMT instead

Posted by Amir Akhmedov <am...@gmail.com>.
You need to register a bean as follow

<bean id="transactionManager"
class="org.apache.ignite.transactions.spring.SpringTransactionManager">
        <property name="transactionConcurrency" value="OPTIMISTIC"/>
        <property name="igniteInstanceName" value="testGrid"/>
</bean>


Please check the link a sent you earlier it has tests with all
required configurations. It can serve as a good example.

Re: No transaction is currently active || Not allowed to create transaction on shared EntityManager - use Spring transactions or EJB CMT instead

Posted by rizal123 <kh...@btpn.com>.
Hi Amir,

How to registered Ignite's Spring Transaction Manager?
Would you mind share your code...

Thanks for your help Amir....



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/