Giriş
Açıklaması şöyle.
Örnek
Şöyle yaparız.
Açıklaması şöyle.
...if you want to work with multiple transactional resources, you'll need global transactions which involve a JTA capable application server. And JTA capable application server means a real J2EE container or a non J2EE container (like Tomcat) with a standalone transaction manager like Atomikos, JOTM, Bitronix, SimpleJTA, JBossTS or GeronimoTM/Jencks.
Açıklaması şöyle
This manager allows using fully supported distributed transactions based on a two-phase commit. However, it delegates management to a backend JTA provider. It may be Java EE servers or standalone solutions.
Atomicos
Maven
Şu satırı dahil ederiz
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jta-atomikos</artifactId>
</dependency>
GradleŞu satırı dahil ederizimplementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-jta-atomikos'
Şöyle yaparız.
<bean id="wsTxManager"
class="org.springframework.transaction.jta.WebSphereTransactionManagerFactoryBean" />
<bean id="txManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="userTransactionName">
<null />
</property>
<property name="transactionManager" ref="wsTxManager" />
</bean>
Hiç yorum yok:
Yorum Gönder