Giter VIP home page Giter VIP logo

spring-boot-tcc-rest's Introduction

spring-boot-tcc-rest

Sample demo for Atomikos TCC Rest

To start the coordinator, create a maven project and add this dependency:

<dependency>
  <groupId>com.atomikos</groupId>
  <artifactId>transactions-tcc-rest</artifactId>
  <version>LATEST</version>
</dependency>
<!-- This dependency is needed if you're using the Jetty container -->
<dependency>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-rt-transports-http-jetty</artifactId>
  <version>3.1.6</version>
  <optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
   <artifactId>cxf-rt-rs-client</artifactId>
   <version>3.1.6</version>
   <optional>true</optional>
 </dependency>
 <dependency>
   <groupId>org.apache.cxf</groupId>
   <artifactId>cxf-rt-frontend-jaxrs</artifactId>
   <version>3.1.6</version>
   <optional>true</optional>
 </dependency>
 <dependency>
   <groupId>org.apache.cxf</groupId>
   <artifactId>cxf-rt-rs-extension-providers</artifactId>
   <version>3.1.6</version>
   <optional>true</optional>
 </dependency>
 <dependency>
   <groupId>com.fasterxml.jackson.jaxrs</groupId>
   <artifactId>jackson-jaxrs-json-provider</artifactId>
   <version>2.7.4</version>
   <optional>true</optional>
 </dependency>
 <dependency>
   <groupId>org.codehaus.jettison</groupId>
   <artifactId>jettison</artifactId>
   <version>1.3.7</version>
   <optional>true</optional>
 </dependency>

where LATEST corresponds to the latest possible version found.

maven will grab automatically all required dependencies transitively.

Configure the maven-exec-plugin :

<build>
 <plugins>
    ...
	<plugin>
   	<groupId>org.codehaus.mojo</groupId>
   	<artifactId>exec-maven-plugin</artifactId>
   	<version>1.2.1</version>
   	<executions>
    <execution>
      <goals>
      	<goal>exec</goal>
      </goals>
    </execution>
   	</executions>
   	<configuration>
    <executable>java</executable>
    <arguments>
      <argument>-classpath</argument>
      <!-- automatically creates the classpath using all project dependencies, 
      	also adding the project build directory -->
      <classpath />
      <argument>com.atomikos.icatch.tcc.rest.Server</argument>
      <argument>8080</argument>
    </arguments>
   	</configuration>
   </plugin>

where 8080 represents the port of the http server.

then simply perform at the root of the project :

mvn exec:exec

you should be albe to see : INFOS: Setting the server's publish address to be http://localhost:8080

Power feature :

The commercial version ExtremeTransactions (https://www.atomikos.com/Main/ExtremeTransactions) provides a built-in executable coordinator service that is straighforward to launch.

spring-boot-tcc-rest's People

Contributors

pascalleclercq avatar

Watchers

dikang123 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.