├── ArjunaJTS
├── recovery
│ ├── ExampleXAResource2.xid
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ ├── ExampleXAResource2.java
│ │ │ └── ExampleXAResource1.java
│ ├── run.bat
│ └── run.sh
├── interop
│ ├── glassfish
│ │ ├── step5.sh
│ │ ├── step6.sh
│ │ ├── step4.sh
│ │ ├── step3.sh
│ │ ├── step2.sh
│ │ ├── step7.sh
│ │ ├── configure-jts-transactions.cli
│ │ └── run.sh
│ ├── test-ejbs
│ │ └── src
│ │ │ └── main
│ │ │ ├── java
│ │ │ └── service
│ │ │ │ ├── remote
│ │ │ │ ├── ISessionHome.java
│ │ │ │ └── ISession.java
│ │ │ │ └── local
│ │ │ │ └── ISession.java
│ │ │ └── webapp
│ │ │ └── WEB-INF
│ │ │ ├── beans.xml
│ │ │ ├── jboss-ejb3.xml
│ │ │ └── web.xml
│ └── resource
│ │ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── jboss
│ │ └── narayana
│ │ ├── ASFailureMode.java
│ │ └── ASFailureType.java
├── trailmap
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── arjuna
│ │ └── demo
│ │ ├── jta
│ │ ├── jdbcbank
│ │ │ └── NotExistingAccount.java
│ │ └── localbank
│ │ │ └── NotExistingAccount.java
│ │ ├── jts
│ │ └── localbank
│ │ │ └── NotExistingAccount.java
│ │ └── simple
│ │ └── HelloImpl.java
└── standalone
│ ├── run.bat
│ └── run.sh
├── rts
├── lra
│ ├── lra-coordinator
│ │ ├── .gitignore
│ │ └── Dockerfile
│ ├── .gitignore
│ ├── lra-test
│ │ └── .gitignore
│ ├── hotel-service
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── resources
│ │ │ │ └── application.properties
│ │ │ │ └── java
│ │ │ │ └── io
│ │ │ │ └── narayana
│ │ │ │ └── rts
│ │ │ │ └── lra
│ │ │ │ └── demo
│ │ │ │ └── hotel
│ │ │ │ └── JaxRsActivator.java
│ │ └── Dockerfile
│ ├── flight-service
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── resources
│ │ │ │ └── application.properties
│ │ │ │ └── java
│ │ │ │ └── io
│ │ │ │ └── narayana
│ │ │ │ └── rts
│ │ │ │ └── lra
│ │ │ │ └── demo
│ │ │ │ └── flight
│ │ │ │ └── JaxRsActivator.java
│ │ └── Dockerfile
│ ├── trip-controller
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── resources
│ │ │ │ └── application.properties
│ │ │ │ └── java
│ │ │ │ └── io
│ │ │ │ └── narayana
│ │ │ │ └── rts
│ │ │ │ └── lra
│ │ │ │ └── demo
│ │ │ │ └── tripcontroller
│ │ │ │ ├── JaxRsActivator.java
│ │ │ │ ├── BookingException.java
│ │ │ │ └── BookingExceptionMapper.java
│ │ └── Dockerfile
│ └── foo.sh
├── at
│ ├── annotation
│ │ ├── flight-service
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ ├── resources
│ │ │ │ ├── application.properties
│ │ │ │ └── META-INF
│ │ │ │ │ ├── services
│ │ │ │ │ └── jakarta.ws.rs.ext.Providers
│ │ │ │ │ └── beans.xml
│ │ │ │ └── java
│ │ │ │ └── io
│ │ │ │ └── narayana
│ │ │ │ └── sra
│ │ │ │ └── demo
│ │ │ │ └── service
│ │ │ │ └── FlightService.java
│ │ ├── hotel-service
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ ├── resources
│ │ │ │ ├── application.properties
│ │ │ │ └── META-INF
│ │ │ │ │ ├── services
│ │ │ │ │ └── jakarta.ws.rs.ext.Providers
│ │ │ │ │ └── beans.xml
│ │ │ │ └── java
│ │ │ │ └── io
│ │ │ │ └── narayana
│ │ │ │ └── sra
│ │ │ │ └── demo
│ │ │ │ └── service
│ │ │ │ └── HotelService.java
│ │ ├── common-service
│ │ │ ├── src
│ │ │ │ └── main
│ │ │ │ │ ├── resources
│ │ │ │ │ └── META-INF
│ │ │ │ │ │ ├── services
│ │ │ │ │ │ └── jakarta.ws.rs.ext.Providers
│ │ │ │ │ │ └── beans.xml
│ │ │ │ │ └── java
│ │ │ │ │ └── io
│ │ │ │ │ └── narayana
│ │ │ │ │ └── sra
│ │ │ │ │ └── demo
│ │ │ │ │ ├── service
│ │ │ │ │ ├── BookingException.java
│ │ │ │ │ └── BookingExceptionMapper.java
│ │ │ │ │ └── constant
│ │ │ │ │ └── ServiceConstant.java
│ │ │ └── pom.xml
│ │ ├── trip-service
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── resources
│ │ │ │ ├── META-INF
│ │ │ │ ├── services
│ │ │ │ │ └── jakarta.ws.rs.ext.Providers
│ │ │ │ └── beans.xml
│ │ │ │ └── application.properties
│ │ ├── stop-wildfly-coordinator.sh
│ │ ├── start-wildfly-coordinator.sh
│ │ ├── stop-services.sh
│ │ └── start-services.sh
│ ├── simple
│ │ ├── run.bat
│ │ └── run.sh
│ ├── service
│ │ ├── service1
│ │ │ ├── run.bat
│ │ │ ├── run.sh
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── java
│ │ │ │ └── quickstart
│ │ │ │ └── JAXRSServer.java
│ │ ├── service2
│ │ │ ├── run.bat
│ │ │ ├── run.sh
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── java
│ │ │ │ └── quickstart
│ │ │ │ └── WorkDeserializer.java
│ │ └── pom.xml
│ ├── undertow
│ │ ├── etc
│ │ │ └── jbossts-properties.xml
│ │ ├── run.sh
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── resources
│ │ │ │ └── META-INF
│ │ │ │ │ └── beans.xml
│ │ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── jboss
│ │ │ │ └── narayana
│ │ │ │ └── rts
│ │ │ │ └── JAXRSServer.java
│ │ └── run.bat
│ ├── jta-service
│ │ ├── jms
│ │ │ └── src
│ │ │ │ ├── main
│ │ │ │ └── webapp
│ │ │ │ │ └── WEB-INF
│ │ │ │ │ ├── web.xml
│ │ │ │ │ └── beans.xml
│ │ │ │ └── test
│ │ │ │ └── resources
│ │ │ │ └── arquillian.xml
│ │ └── jpa
│ │ │ └── src
│ │ │ ├── main
│ │ │ ├── webapp
│ │ │ │ └── WEB-INF
│ │ │ │ │ ├── web.xml
│ │ │ │ │ ├── beans.xml
│ │ │ │ │ └── test-ds.xml
│ │ │ ├── java
│ │ │ │ └── org
│ │ │ │ │ └── jboss
│ │ │ │ │ └── narayana
│ │ │ │ │ └── quickstart
│ │ │ │ │ └── rest
│ │ │ │ │ └── bridge
│ │ │ │ │ └── inbound
│ │ │ │ │ └── jpa
│ │ │ │ │ └── model
│ │ │ │ │ ├── UserTableDao.java
│ │ │ │ │ └── TaskDao.java
│ │ │ └── resources
│ │ │ │ └── META-INF
│ │ │ │ └── persistence.xml
│ │ │ └── test
│ │ │ └── resources
│ │ │ └── arquillian.xml
│ └── recovery
│ │ ├── recovery2
│ │ ├── run.bat
│ │ ├── run.sh
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── quickstart
│ │ │ └── WorkDeserializer.java
│ │ ├── recovery1
│ │ ├── run.bat
│ │ ├── run.sh
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── quickstart
│ │ │ └── JAXRSServer.java
│ │ └── pom.xml
└── lra-examples
│ ├── cdi-participant
│ └── src
│ │ └── main
│ │ ├── resources
│ │ ├── application.properties
│ │ └── META-INF
│ │ │ └── beans.xml
│ │ └── java
│ │ └── io
│ │ └── narayana
│ │ └── rts
│ │ └── lra
│ │ └── JaxRsActivator.java
│ ├── cdi-embedded
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ ├── application.properties
│ │ │ ├── META-INF
│ │ │ └── beans.xml
│ │ │ └── jbossts-properties.xml
│ └── README.md
│ ├── coordinator-quarkus
│ └── src
│ │ └── main
│ │ └── resources
│ │ ├── application.properties
│ │ └── reflection-config.json
│ ├── lra-jwt
│ ├── wildfly
│ │ └── restore-configuration.cli
│ └── pom.xml
│ └── README.md
├── jts-atomic-app
├── .gitignore
├── artifacts
│ └── docker
│ │ ├── jacorb-name-server_run
│ │ └── jts-transaction-service_run
├── Dockerfile
└── Vagrantfile
├── XTS
├── ssl
│ └── .gitignore
├── raw-xts-api-demo
│ ├── .gitignore
│ ├── war
│ │ └── src
│ │ │ └── main
│ │ │ └── webapp
│ │ │ └── images
│ │ │ ├── a_nav_6699cc.gif
│ │ │ ├── bl_corner_10.gif
│ │ │ ├── br_corner_10.gif
│ │ │ ├── tl_corner_10.gif
│ │ │ ├── tr_corner_10.gif
│ │ │ ├── bl_navcorner_20.gif
│ │ │ ├── br_navcorner_20.gif
│ │ │ ├── tl_navcorner_20.gif
│ │ │ ├── tr_navcorner_20.gif
│ │ │ ├── JBoss_DivOfRH_RGB.gif
│ │ │ └── JBoss_byRH_logo_rgb.png
│ ├── rpc
│ │ └── src
│ │ │ └── main
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── arjuna
│ │ │ │ ├── xts
│ │ │ │ └── nightout
│ │ │ │ │ ├── services
│ │ │ │ │ ├── Taxi
│ │ │ │ │ │ ├── ITaxiService.java
│ │ │ │ │ │ └── ITaxiServiceBA.java
│ │ │ │ │ ├── Theatre
│ │ │ │ │ │ ├── ITheatreService.java
│ │ │ │ │ │ └── ITheatreServiceBA.java
│ │ │ │ │ ├── Restaurant
│ │ │ │ │ │ ├── IRestaurantService.java
│ │ │ │ │ │ └── IRestaurantServiceBA.java
│ │ │ │ │ └── recovery
│ │ │ │ │ │ ├── DemoRPCATRecoveryListener.java
│ │ │ │ │ │ └── DemoRPCBARecoveryListener.java
│ │ │ │ │ └── clients
│ │ │ │ │ └── jboss
│ │ │ │ │ ├── taxi
│ │ │ │ │ ├── ITaxiServiceAT.java
│ │ │ │ │ └── ITaxiServiceBA.java
│ │ │ │ │ ├── restaurant
│ │ │ │ │ ├── IRestaurantServiceAT.java
│ │ │ │ │ └── IRestaurantServiceBA.java
│ │ │ │ │ └── theatre
│ │ │ │ │ ├── ITheatreServiceAT.java
│ │ │ │ │ └── ITheatreServiceBA.java
│ │ │ │ └── mw
│ │ │ │ └── wst
│ │ │ │ └── service
│ │ │ │ └── JaxRPCSubordinateHeaderContextProcessor.java
│ │ │ └── dd
│ │ │ └── jboss
│ │ │ ├── jaxrpc-mapping.xml
│ │ │ └── client-jaxrpc-mapping.xml
│ ├── core
│ │ └── src
│ │ │ └── main
│ │ │ ├── resources
│ │ │ └── context-handlers.xml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── jboss
│ │ │ └── jbosstm
│ │ │ └── xts
│ │ │ └── demo
│ │ │ ├── taxi
│ │ │ ├── ITaxiServiceAT.java
│ │ │ └── ITaxiServiceBA.java
│ │ │ ├── services
│ │ │ ├── state
│ │ │ │ └── ServiceStateConstants.java
│ │ │ ├── restaurant
│ │ │ │ └── RestaurantConstants.java
│ │ │ └── recovery
│ │ │ │ ├── DemoATRecoveryListener.java
│ │ │ │ └── DemoBARecoveryListener.java
│ │ │ ├── restaurant
│ │ │ ├── IRestaurantServiceAT.java
│ │ │ └── IRestaurantServiceBA.java
│ │ │ └── theatre
│ │ │ ├── ITheatreServiceAT.java
│ │ │ └── ITheatreServiceBA.java
│ ├── byteman-scripts
│ │ └── demotrace.txt
│ └── test
│ │ └── src
│ │ └── test
│ │ └── resources
│ │ ├── arquillian.xml
│ │ └── logging.properties
├── wsat-jta-multi_service
│ └── src
│ │ ├── test
│ │ ├── resources
│ │ │ └── persistence.xml
│ │ └── java
│ │ │ └── org
│ │ │ └── jboss
│ │ │ └── narayana
│ │ │ └── quickstarts
│ │ │ └── wsat
│ │ │ └── jtabridge
│ │ │ └── fromjta
│ │ │ ├── FirstClient.java
│ │ │ └── SecondClient.java
│ │ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── persistence.xml
│ │ └── java
│ │ └── org
│ │ └── jboss
│ │ └── narayana
│ │ └── quickstarts
│ │ └── wsat
│ │ └── jtabridge
│ │ ├── first
│ │ ├── FirstCounterEntity.java
│ │ └── jaxws
│ │ │ └── FirstServiceAT.java
│ │ └── second
│ │ ├── SecondCounterEntity.java
│ │ └── jaxws
│ │ └── SecondServiceAT.java
└── wsat-jta-multi_hop
│ └── src
│ ├── main
│ ├── resources
│ │ └── META-INF
│ │ │ └── persistence.xml
│ └── java
│ │ └── org
│ │ └── jboss
│ │ └── narayana
│ │ └── quickstarts
│ │ └── wsat
│ │ └── jtabridge
│ │ ├── second
│ │ ├── SecondClient.java
│ │ ├── SecondCounterEntity.java
│ │ └── jaxws
│ │ │ └── SecondServiceAT.java
│ │ └── first
│ │ └── FirstCounterEntity.java
│ └── test
│ ├── resources
│ └── arquillian.xml
│ └── java
│ └── org
│ └── jboss
│ └── narayana
│ └── quickstarts
│ └── wsat
│ └── jtabridge
│ └── fromjta
│ └── FirstClient.java
├── jta-and-hibernate-standalone
└── src
│ └── main
│ ├── resources
│ ├── META-INF
│ │ └── beans.xml
│ ├── jndi.properties
│ ├── jdbc-recovery.xml
│ └── log4j.properties
│ └── java
│ └── org
│ └── jboss
│ └── narayana
│ └── quickstart
│ └── jta
│ ├── QuickstartRuntimeException.java
│ ├── EntityManagerProducer.java
│ └── EntityManagerFactoryProducer.java
├── wiki-example
├── src
│ └── org
│ │ └── jboss
│ │ └── jbossts
│ │ └── qa
│ │ └── astests
│ │ ├── resources
│ │ └── java.policy
│ │ ├── ejb2
│ │ ├── EJB2Home.java
│ │ └── EJB2Remote.java
│ │ ├── ejb3
│ │ └── EJB3Remote.java
│ │ └── META-INF
│ │ └── jboss.xml
└── resources
│ └── jbossts-properties.xml
├── jpms
└── jta
│ ├── config
│ ├── src
│ │ ├── main
│ │ │ └── io.narayana.config
│ │ │ │ ├── module-info.java
│ │ │ │ └── io
│ │ │ │ └── narayana
│ │ │ │ └── config
│ │ │ │ └── Config.java
│ │ └── test
│ │ │ └── io.narayana.config
│ │ │ └── io
│ │ │ └── narayana
│ │ │ └── config
│ │ │ └── BasicTest.java
│ └── pom.xml
│ ├── demo
│ ├── run.sh
│ └── src
│ │ └── main
│ │ ├── io.narayana.demo
│ │ └── module-info.java
│ │ └── resources
│ │ └── log4j2.properties
│ ├── notes
│ ├── txuser
│ └── src
│ │ └── main
│ │ └── io.narayana.txuser
│ │ ├── io
│ │ └── narayana
│ │ │ └── txuser
│ │ │ └── TxUserException.java
│ │ └── module-info.java
│ └── recovery
│ └── src
│ └── main
│ └── io.narayana.recovery
│ ├── io
│ └── narayana
│ │ └── recovery
│ │ └── RecoveryException.java
│ └── module-info.java
├── STM
├── vertx
│ └── README.adoc
├── jta
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ ├── Atomic.java
│ │ │ └── ExampleSTM.java
│ └── README.md
├── optimistic
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ ├── Atomic.java
│ │ │ └── ExampleSTM.java
│ └── README.md
├── README.md
└── pessimistic
│ ├── README.md
│ └── src
│ └── main
│ └── java
│ ├── Atomic.java
│ └── ExampleSTM.java
├── transactionaldriver
├── transactionaldriver-standalone
│ └── src
│ │ └── main
│ │ ├── resources
│ │ ├── ds1.h2.properties
│ │ ├── ds2.h2.properties
│ │ ├── ds1.pg.properties
│ │ ├── ds2.pg.properties
│ │ ├── recovery-jdbcxa-test1.xml
│ │ ├── recovery-basicxa-test1.xml
│ │ ├── logging.properties
│ │ └── xaexception.rmfail.btm
│ │ └── java
│ │ └── io
│ │ └── narayana
│ │ └── util
│ │ ├── RunnableWithException.java
│ │ └── TestInitialContextFactory.java
└── pom.xml
├── jts-docker
├── src
│ └── test
│ │ └── resources
│ │ ├── docker-narayana-lib
│ │ └── postgresql-9.4-1201.jdbc4.jar
│ │ ├── jbossts-properties.xml
│ │ └── docker-narayana-config
│ │ └── log4j.properties
└── kubernetes
│ └── jts-pod.yaml
├── wildfly
├── commit-markable-resource
│ └── src
│ │ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── cmr-create-script.sql
│ │ ├── webapp
│ │ └── WEB-INF
│ │ │ ├── faces-config.xml
│ │ │ └── web.xml
│ │ └── java
│ │ └── org
│ │ └── jboss
│ │ └── narayana
│ │ └── quickstarts
│ │ └── cmr
│ │ ├── BookProcessorLrco.java
│ │ ├── BookProcessorCmr.java
│ │ └── jsf
│ │ └── Book.java
└── setCheckedActionFactoryExample
│ └── src
│ └── main
│ ├── webapp
│ ├── index.html
│ ├── WEB-INF
│ │ ├── beans.xml
│ │ └── faces-config.xml
│ └── checkedActionFactoryExample.xhtml
│ └── java
│ └── org
│ └── narayana
│ ├── handler
│ └── MyEJB.java
│ └── CheckedActionFactoryExample.java
├── ArjunaJTA
├── jakartaee_transactional_app
│ └── src
│ │ ├── main
│ │ ├── webapp
│ │ │ ├── index.html
│ │ │ ├── WEB-INF
│ │ │ │ ├── beans.xml
│ │ │ │ └── faces-config.xml
│ │ │ ├── count.xhtml
│ │ │ ├── duplicate.xhtml
│ │ │ ├── template.xhtml
│ │ │ ├── addCustomer.xhtml
│ │ │ └── customers.xhtml
│ │ ├── java
│ │ │ └── org
│ │ │ │ └── jboss
│ │ │ │ └── narayana
│ │ │ │ └── quickstarts
│ │ │ │ └── jpa
│ │ │ │ └── Customer.java
│ │ └── resources
│ │ │ └── META-INF
│ │ │ └── persistence.xml
│ │ └── test
│ │ └── resources
│ │ └── arquillian.xml
├── maven
│ ├── run.bat
│ └── run.sh
├── jakarta_transaction
│ ├── run.bat
│ ├── run.sh
│ └── README.md
├── object_store
│ ├── run.bat
│ └── run.sh
└── recovery
│ └── src
│ └── main
│ └── java
│ └── org
│ └── jboss
│ └── narayana
│ └── jta
│ └── quickstarts
│ └── recovery
│ └── RecoverySetup.java
├── ArjunaCore
├── txoj
│ ├── run.bat
│ └── run.sh
└── README.md
├── compensating-transactions
├── travel-agent
│ ├── src
│ │ ├── main
│ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── jboss
│ │ │ │ └── narayana
│ │ │ │ └── quickstarts
│ │ │ │ └── compensationsApi
│ │ │ │ ├── hotel
│ │ │ │ ├── BookingStatus.java
│ │ │ │ └── BookingData.java
│ │ │ │ ├── taxi2
│ │ │ │ ├── BookingStatus.java
│ │ │ │ └── BookingData.java
│ │ │ │ └── taxi1
│ │ │ │ ├── BookingUnavailableRuntimeException.java
│ │ │ │ └── jaxws
│ │ │ │ └── Taxi1Service.java
│ │ └── test
│ │ │ ├── resources
│ │ │ └── persistence.xml
│ │ │ └── java
│ │ │ └── org
│ │ │ └── jboss
│ │ │ └── narayana
│ │ │ └── quickstarts
│ │ │ └── compensationsApi
│ │ │ └── travel
│ │ │ └── TravelBookingResult.java
│ └── README.md
├── mongodb-simple
│ └── src
│ │ ├── test
│ │ ├── java
│ │ │ └── org
│ │ │ │ └── jboss
│ │ │ │ └── narayana
│ │ │ │ └── quickstarts
│ │ │ │ └── mongodb
│ │ │ │ └── simple
│ │ │ │ └── resources
│ │ │ │ └── JaxRsActivator.java
│ │ └── resources
│ │ │ └── arquillian.xml
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── jboss
│ │ └── narayana
│ │ └── quickstarts
│ │ └── mongodb
│ │ └── simple
│ │ ├── CreditData.java
│ │ ├── DebitData.java
│ │ └── Resources.java
├── non-transactional_resource
│ ├── README.md
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── jboss
│ │ └── narayana
│ │ └── quickstarts
│ │ └── nonTransactionalResource
│ │ └── bookService
│ │ ├── DestroyInvoice.java
│ │ ├── RecallPackage.java
│ │ ├── PackageDispatcher.java
│ │ ├── OrderData.java
│ │ ├── BookService.java
│ │ ├── InvoicePrinter.java
│ │ └── InvoiceData.java
└── README.md
├── spring
├── narayana-spring-boot
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── org
│ │ │ │ └── jboss
│ │ │ │ └── narayana
│ │ │ │ └── quickstart
│ │ │ │ └── spring
│ │ │ │ ├── EntriesRepository.java
│ │ │ │ └── MessagesListener.java
│ │ └── resources
│ │ │ └── application.properties
│ │ └── test
│ │ └── resources
│ │ └── application.properties
├── camel-with-narayana-spring-boot
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── org
│ │ │ └── jboss
│ │ │ └── narayana
│ │ │ └── quickstart
│ │ │ └── spring
│ │ │ ├── UserRepository.java
│ │ │ ├── UserBean.java
│ │ │ ├── HaltBean.java
│ │ │ ├── CamelApplication.java
│ │ │ ├── User.java
│ │ │ └── JmsConfig.java
│ │ └── resources
│ │ ├── application-test.properties
│ │ └── application.properties
├── stock-market-with-narayana-spring-boot
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── org
│ │ │ └── jboss
│ │ │ └── narayana
│ │ │ └── quickstart
│ │ │ └── spring
│ │ │ ├── UserRepository.java
│ │ │ ├── ShareRepository.java
│ │ │ ├── PortfolioEntryRepository.java
│ │ │ ├── MessageListener.java
│ │ │ └── StockMarketApplication.java
│ │ └── resources
│ │ └── application.properties
└── jta
│ ├── src
│ ├── main
│ │ ├── java
│ │ │ └── org
│ │ │ │ └── jboss
│ │ │ │ └── narayana
│ │ │ │ └── quickstart
│ │ │ │ └── spring
│ │ │ │ └── config
│ │ │ │ └── DummyXAConfig.java
│ │ └── resources
│ │ │ └── log4j.properties
│ └── test
│ │ └── resources
│ │ └── log4j.properties
│ └── README.md
├── PULL_REQUEST_TEMPLATE.md
├── agroal
└── src
│ └── main
│ └── resources
│ ├── logging.properties
│ └── xaexception.rmfail.btm
├── atsintegration
├── README.md
└── src
│ └── main
│ └── java
│ └── com
│ └── arjuna
│ └── jta
│ └── distributed
│ └── example
│ ├── resources
│ └── TestSynchronization.java
│ └── server
│ ├── LookupProvider.java
│ └── impl
│ └── ProxyXAResourceDeserializer.java
├── tools
└── download-maven.sh
├── .gitignore
├── jta-1_2-in-wildfly
└── src
│ ├── main
│ └── java
│ │ └── org
│ │ └── jboss
│ │ └── narayana
│ │ └── quickstarts
│ │ └── jta
│ │ ├── TransactionScopedPojo.java
│ │ └── QuickstartEntity.java
│ └── test
│ └── resources
│ └── arquillian.xml
├── SECURITY.md
└── jta-1_2-standalone
├── src
├── main
│ └── resources
│ │ └── META-INF
│ │ └── beans.xml
└── test
│ └── resources
│ └── jbossts-properties.xml
└── README.md
/ArjunaJTS/recovery/ExampleXAResource2.xid:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/rts/lra/lra-coordinator/.gitignore:
--------------------------------------------------------------------------------
1 | target/
--------------------------------------------------------------------------------
/jts-atomic-app/.gitignore:
--------------------------------------------------------------------------------
1 | .vagrant
2 | .idea
3 |
--------------------------------------------------------------------------------
/XTS/ssl/.gitignore:
--------------------------------------------------------------------------------
1 | client/
2 | quickstart/
3 | server/
4 | wildfly/
5 |
--------------------------------------------------------------------------------
/XTS/raw-xts-api-demo/.gitignore:
--------------------------------------------------------------------------------
1 | restaurantManagerState
2 | theatreManagerState
3 |
--------------------------------------------------------------------------------
/rts/at/annotation/flight-service/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | quarkus.http.port=8084
--------------------------------------------------------------------------------
/rts/at/annotation/hotel-service/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | quarkus.http.port=8083
--------------------------------------------------------------------------------
/rts/lra/.gitignore:
--------------------------------------------------------------------------------
1 | narayana-full-5.6.5.Final-SNAPSHOT/
2 | narayana-full-5.6.5.Final-SNAPSHOT-bin.zip
--------------------------------------------------------------------------------
/jta-and-hibernate-standalone/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
10 | java -jar target/quarkus-app/quarkus-run.jar & 11 |12 | 13 | Then follow the instructions in the [`cdi-participant README.md file`](#../cdi-participant/README.md). For example, 14 | 15 |
18 |
19 | will send a JAX-RS request to an application endpoint annotated with `@LRA(LRA.Type.REQUIRED`.
20 | The embedded coordinator will start an LRA just before the JAX-RS method is entered
21 | and will end it just after the method finishes.
22 |
--------------------------------------------------------------------------------
/XTS/raw-xts-api-demo/core/src/main/java/com/jboss/jbosstm/xts/demo/taxi/ITaxiServiceBA.java:
--------------------------------------------------------------------------------
1 | package com.jboss.jbosstm.xts.demo.taxi;
2 |
3 | import jakarta.jws.WebMethod;
4 | import jakarta.jws.WebResult;
5 | import jakarta.jws.WebService;
6 | import jakarta.jws.soap.SOAPBinding;
7 |
8 |
9 | /**
10 | * This class was generated by the JAX-WS RI.
11 | * JAX-WS RI 2.1.2-hudson-182-RC1
12 | * Generated source version: 2.0
13 | *
14 | */
15 | @WebService(name = "ITaxiServiceBA", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Taxi")
16 | @SOAPBinding(style = SOAPBinding.Style.RPC)
17 | public interface ITaxiServiceBA {
18 |
19 |
20 | /**
21 | *
22 | * @return
23 | * returns boolean
24 | */
25 | @WebMethod
26 | @WebResult(name = "bookTaxiBAResponse", partName = "bookTaxiBAResponse")
27 | public boolean bookTaxi();
28 |
29 | }
--------------------------------------------------------------------------------
/rts/at/jta-service/jpa/src/main/webapp/WEB-INF/test-ds.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 | org.h2.jdbcx.JdbcDataSource
7 | jdbc:h2:file:./db/rest-tx-bridge-jpa-quickstart;DB_CLOSE_ON_EXIT=FALSE
8 |
9 | h2
10 |
11 |
12 | sa
13 |
14 | sa
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ArjunaJTS/interop/glassfish/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -ex
3 |
4 | echo "===== JTS interop quickstart: step 1 (compile gf and wf):"; ./step1.sh
5 | sleep `timeout_adjust 3 2>/dev/null || echo 3`
6 | echo "===== JTS interop quickstart: step 2 (start GlassFish):"; ./step2.sh
7 | sleep `timeout_adjust 10 2>/dev/null || echo 10`
8 | echo "===== JTS interop quickstart: step 3 (start WildFly):"; ./step3.sh
9 | sleep `timeout_adjust 10 2>/dev/null || echo 10`
10 |
11 | trap ./step7.sh EXIT
12 |
13 | echo "===== JTS interop quickstart: step 4 (deploy EJBs):"; ./step4.sh
14 | sleep `timeout_adjust 10 2>/dev/null || echo 10`
15 | echo "===== JTS interop quickstart: step 5 (EJB call gf -> wf):"; ./step5.sh
16 | sleep `timeout_adjust 4 2>/dev/null || echo 4`
17 | echo "===== JTS interop quickstart: step 6 (EJB call wf -> gf):"; ./step6.sh
18 | sleep `timeout_adjust 4 2>/dev/null || echo 4`
19 |
20 |
--------------------------------------------------------------------------------
/jpms/jta/demo/src/main/resources/log4j2.properties:
--------------------------------------------------------------------------------
1 | name=PropertiesConfig
2 | property.filename = logs
3 |
4 | appenders = console, file
5 |
6 | appender.console.type = Console
7 | appender.console.name = STDOUT
8 | appender.console.layout.type = PatternLayout
9 | appender.console.layout.pattern = [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
10 |
11 | appender.file.type = File
12 | appender.file.name = LOGFILE
13 | appender.file.fileName=target/demo.log
14 | appender.file.layout.type=PatternLayout
15 | appender.file.layout.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
16 |
17 | loggers=file
18 | logger.file.name=io.narayana
19 | logger.file.level = info
20 | logger.file.appenderRefs = file
21 | logger.file.appenderRef.file.ref = LOGFILE
22 |
23 | rootLogger.level = info
24 | rootLogger.appenderRefs = stdout
25 | rootLogger.appenderRef.stdout.ref = STDOUT
--------------------------------------------------------------------------------
/XTS/raw-xts-api-demo/core/src/main/java/com/jboss/jbosstm/xts/demo/restaurant/IRestaurantServiceAT.java:
--------------------------------------------------------------------------------
1 | package com.jboss.jbosstm.xts.demo.restaurant;
2 |
3 | import jakarta.jws.WebMethod;
4 | import jakarta.jws.WebParam;
5 | import jakarta.jws.WebService;
6 | import jakarta.jws.soap.SOAPBinding;
7 |
8 |
9 | /**
10 | * This class was generated by the JAX-WS RI.
11 | * JAX-WS RI 2.1.2-hudson-182-RC1
12 | * Generated source version: 2.0
13 | *
14 | */
15 | @WebService(name = "IRestaurantServiceAT", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Restaurant")
16 | @SOAPBinding(style = SOAPBinding.Style.RPC)
17 | public interface IRestaurantServiceAT {
18 |
19 |
20 | /**
21 | *
22 | * @param howMany
23 | */
24 | @WebMethod
25 | public void bookSeats(
26 | @WebParam(name = "how_many", partName = "how_many")
27 | int howMany);
28 |
29 | }
--------------------------------------------------------------------------------
/rts/at/annotation/common-service/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 | org.jboss.narayana.quickstart.rts
6 | annotation
7 | 7.3.4.Final-SNAPSHOT
8 |
9 | org.jboss.narayana.quickstart.rts
10 | common-service
11 | jar
12 | common-service
13 |
14 |
15 | com.fasterxml.jackson.core
16 | jackson-annotations
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/rts/at/annotation/start-services.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ############################
4 |
5 | # Step 1: Clean and package the Maven project, skipping tests
6 | mvn clean package -DskipTests
7 |
8 | # Step 2: Run flight-service in the background
9 | java -jar flight-service/target/quarkus-app/quarkus-run.jar &
10 |
11 | # Step 3: Run hotel-service in the background
12 | java -jar hotel-service/target/quarkus-app/quarkus-run.jar &
13 |
14 | # Step 4: Run trip-service in the background
15 | java -jar trip-service/target/quarkus-app/quarkus-run.jar &
16 |
17 | # Wait for a few seconds to give time for the services to start
18 | sleep 10
19 |
20 | # Check if the services are running
21 | if $(jps | grep -q "quarkus-run.jar"); then
22 | echo "All services started successfully!"
23 | else
24 | echo "Failed to start one or more services. Please check the logs for more information."
25 | fi
26 |
--------------------------------------------------------------------------------
/ArjunaJTS/standalone/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # ALLOW JOBS TO BE BACKGROUNDED
4 | set -m
5 |
6 | OPENJDKORBPROPS="-DOrbPortabilityEnvironmentBean.orbDataClassName=com.arjuna.orbportability.internal.orbspecific.versions.javaidl_1_4 -DOrbPortabilityEnvironmentBean.orbImpleClassName=com.arjuna.orbportability.internal.orbspecific.javaidl.orb.implementations.javaidl_1_4"
7 |
8 | [ "x$QUICKSTART_NARAYANA_VERSION" != 'x' ] &&\
9 | NARAYANA_VERSION_PARAM="-Dversion.narayana=${QUICKSTART_NARAYANA_VERSION}"
10 |
11 | echo "Running jts standalone quickstart using OpenJDK ORB"
12 | mvn -e exec:java -Dexec.cleanupDaemonThreads=false -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.TransactionExample $OPENJDKORBPROPS $NARAYANA_VERSION_PARAM
13 |
14 | if [ "$?" != "0" ]; then
15 | echo jts standalone using OpenJDK ORB quickstart failed
16 | exit -1
17 | fi
18 |
19 | echo "JTS standalone example succeeded"
20 |
--------------------------------------------------------------------------------
/ArjunaCore/README.md:
--------------------------------------------------------------------------------
1 | # ArjunaCore quickstarts
2 |
3 | ## Overview
4 |
5 | ArjunaCore is the core of Narayana providing a fully functional transaction engine (TxCore) and Transactional Objects for Java (TXOJ).
6 | It is multi-threaded, distributed, supports nested transactions, fault tolerance/recovery
7 | and permits relaxation of subsets of the standard ACID transaction properties.
8 |
9 | TXOJ provides desirable features such as concurrency control, state management and persistence.
10 |
11 | All the quickstarts related to ArjunaCore are found in this folder structure.
12 | Each quickstart has a `README.md` to show how to execute the quickstart and what is happening in it.
13 | Each quickstart also contains a script to run the quickstart automatically and check the result automatically.
14 |
15 |
16 | ## Usage
17 |
18 | `cd` into the required quickstart and follow the `README.md` or call the `run.[sh|bat]` file
19 |
--------------------------------------------------------------------------------
/jta-1_2-standalone/src/test/resources/jbossts-properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 | target/tx-object-store
15 | target/tx-object-store
16 | target/tx-object-store
17 |
18 |
19 |
--------------------------------------------------------------------------------
/rts/at/jta-service/jpa/src/main/resources/META-INF/persistence.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 | java:jboss/datasources/RestTXBridgeJPAQuickstartDS
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/rts/lra-examples/lra-jwt/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 | org.jboss.narayana.quickstart.rts.lra
6 | lra-examples
7 | 7.3.4.Final-SNAPSHOT
8 |
9 | org.jboss.narayana.quickstart.rts.lra
10 | lra-jwt-examples
11 | LRA JWT Quickstart Examples
12 | Provides examples of how to secure LRA endpoints using JWT security mechanism.
13 | pom
14 |
15 |
16 | wildfly
17 |
18 |
19 |
--------------------------------------------------------------------------------
/compensating-transactions/non-transactional_resource/src/main/java/org/jboss/narayana/quickstarts/nonTransactionalResource/bookService/OrderData.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.nonTransactionalResource.bookService;
2 |
3 | import org.jboss.narayana.compensations.api.CompensationScoped;
4 |
5 | import java.io.Serializable;
6 |
7 | /**
8 | * @author paul.robinson@redhat.com 02/08/2013
9 | */
10 | @CompensationScoped
11 | public class OrderData implements Serializable {
12 |
13 | private String item;
14 | private String address;
15 |
16 | public String getItem() {
17 |
18 | return item;
19 | }
20 |
21 | public void setItem(String item) {
22 |
23 | this.item = item;
24 | }
25 |
26 | public String getAddress() {
27 |
28 | return address;
29 | }
30 |
31 | public void setAddress(String address) {
32 |
33 | this.address = address;
34 | }
35 | }
--------------------------------------------------------------------------------
/XTS/raw-xts-api-demo/byteman-scripts/demotrace.txt:
--------------------------------------------------------------------------------
1 | # extra trace rules for debugging
2 | #
3 | # track write shadow state
4 | # just for debug
5 | RULE trace write shadow state
6 | CLASS ServiceStateManager
7 | METHOD writeShadowState
8 | IF TRUE
9 | DO traceln("log", "*** tx : " + $1 + " writing shadow state " + $2),
10 | traceStack(null, "log", 5)
11 | ENDRULE
12 |
13 | # track commit shadow state
14 | # just for debug
15 | RULE trace write commit shadow state
16 | CLASS ServiceStateManager
17 | METHOD commitShadowState
18 | IF TRUE
19 | DO traceln("log", "*** tx : " + $1 + " commit shadow state "),
20 | traceStack(null, "log", 5)
21 | ENDRULE
22 |
23 | # track clear shadow state
24 | # just for debug
25 | RULE trace clear commit shadow state
26 | CLASS ServiceStateManager
27 | METHOD clearShadowState
28 | IF TRUE
29 | DO traceln("log", "*** tx : " + $1 + " clear shadow state "),
30 | traceStack(null, "log", 5)
31 | ENDRULE
32 |
--------------------------------------------------------------------------------
/ArjunaJTA/jakartaee_transactional_app/src/test/resources/arquillian.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 | target/exploded-artifact-for-inspection
11 |
12 |
13 |
14 |
15 |
16 |
17 | -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ArjunaJTA/jakartaee_transactional_app/src/main/resources/META-INF/persistence.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | java:jboss/datasources/ExampleDS
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/ArjunaJTA/jakarta_transaction/README.md:
--------------------------------------------------------------------------------
1 | ## Jakarta transaction quickstart
2 |
3 | ## Overview
4 |
5 | This example shows how to obtain a Jakarta EE conforming transaction and how to invoke various methods
6 | of the `jakarta.transaction.Transaction` interface such as starting and ending transactions, examining
7 | transacton status, timeouts etc.
8 |
9 | ## Usage
10 |
11 | ```
12 | mvn compile exec:exec
13 | ```
14 |
15 | or
16 |
17 | ```
18 | ./run.[sh|bat]
19 | ```
20 |
21 | ## Expected output
22 |
23 | ```
24 | [INFO] BUILD SUCCESS
25 |
26 | otherwise you can examine what went wrong by enabling stack traces with the -e flat:
27 | mvn compile exec:exec -e
28 | ```
29 |
30 | ## What just happened
31 |
32 | The example looks up an instance of the Java EE `UserTransaction` using and calls its various methods.
33 | If anything goes wrong an exception is generated. The example shows how to get
34 | the instance of the `TransactionManager` interface.
35 |
--------------------------------------------------------------------------------
/ArjunaJTA/object_store/run.sh:
--------------------------------------------------------------------------------
1 |
2 | # ALLOW JOBS TO BE BACKGROUNDED
3 | set -m
4 | set -x
5 |
6 | echo "Running object_store quickstart"
7 |
8 | [ "x$QUICKSTART_NARAYANA_VERSION" != 'x' ] &&\
9 | NARAYANA_VERSION_PARAM="-Dversion.narayana=${QUICKSTART_NARAYANA_VERSION}"
10 |
11 | mvn -e exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.VolatileStoreExample $NARAYANA_VERSION_PARAM
12 | if [ "$?" != "0" ]; then
13 | exit -1
14 | fi
15 |
16 | mvn -e exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.HornetqStoreExample $NARAYANA_VERSION_PARAM
17 | if [ "$?" != "0" ]; then
18 | exit -1
19 | fi
20 |
21 | mvn -e exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.FileStoreExample $NARAYANA_VERSION_PARAM
22 | if [ "$?" != "0" ]; then
23 | exit -1
24 | fi
25 |
26 | mvn -e exec:java -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.JDBCStoreExample $NARAYANA_VERSION_PARAM
27 | if [ "$?" != "0" ]; then
28 | exit -1
29 | fi
30 |
--------------------------------------------------------------------------------
/ArjunaJTS/interop/resource/src/main/java/org/jboss/narayana/ASFailureMode.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Specification of what to do when a failure is injected
7 | */
8 | public enum ASFailureMode implements Serializable
9 | {
10 | NONE(false)
11 |
12 | ,HALT(true) // halt the JVM
13 | ,EXIT(true) // exit the JVM
14 | ,SUSPEND(false) // suspend the calling thread
15 | ,XAEXCEPTION(false) // fail via one of the xa exception codes
16 | ;
17 |
18 | private boolean willTerminateVM;
19 |
20 | ASFailureMode(boolean willTerminateVM)
21 | {
22 | this.willTerminateVM = willTerminateVM;
23 | }
24 |
25 | public boolean willTerminateVM()
26 | {
27 | return willTerminateVM;
28 | }
29 |
30 | public static ASFailureMode toEnum(String mode)
31 | {
32 | return ASFailureMode.valueOf(mode.toUpperCase());
33 | }
34 | }
--------------------------------------------------------------------------------
/compensating-transactions/mongodb-simple/src/test/resources/arquillian.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 | target/
10 |
11 |
12 |
13 |
14 | ${server.config}
15 | ${server.jvm.args}
16 | ${node.address}
17 | ${server.startup.timeout:60}
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/jpms/jta/config/src/main/io.narayana.config/io/narayana/config/Config.java:
--------------------------------------------------------------------------------
1 | package io.narayana.config;
2 |
3 | import java.util.List;
4 |
5 | public class Config {
6 | public String nodeName;
7 | public String storeDirectory;
8 | public int recoveryBackoffPeriod;
9 | public int periodicRecoveryPeriod;
10 | public List recoveryModuleClassNames;
11 |
12 | public Config(String nodeName,
13 | String storeDirectory,
14 | int recoveryBackoffPeriod,
15 | int periodicRecoveryPeriod,
16 | List recoveryModuleClassNames) {
17 | this.nodeName = nodeName;
18 | this.storeDirectory = storeDirectory;
19 | this.recoveryBackoffPeriod = recoveryBackoffPeriod;
20 | this.periodicRecoveryPeriod = periodicRecoveryPeriod;
21 | this.recoveryModuleClassNames = recoveryModuleClassNames;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ArjunaJTS/recovery/run.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | echo "Running JTS recovery quickstart"
4 |
5 | OPENJDK_CONFIG="-Dcom.sun.CORBA.POA.ORBServerId=1 -Dcom.sun.CORBA.POA.ORBPersistentServerPort=12567"
6 |
7 | IF NOT %QUICKSTART_NARAYANA_VERSION%x == x SET NARAYANA_VERSION_PARAM="-Dversion.narayana=${QUICKSTART_NARAYANA_VERSION}"
8 |
9 | echo "Generating a recovery record ..."
10 | mvn -e compile exec:java -Dexec.mainClass=Test -Dexec.args="-crash" %OPENJDK_CONFIG %NARAYANA_VERSION_PARAM%
11 | IF %ERRORLEVEL% NEQ 0 exit -1
12 |
13 | echo "Recovering failed service - this could take up to a minute or so ..."
14 | mvn -e exec:java -Dexec.mainClass=Test -Dexec.args="-recover -auto" %OPENJDK_CONFIG %NARAYANA_VERSION_PARAM%
15 | IF %ERRORLEVEL% NEQ 0 exit -1
16 |
17 | echo "Testing that the XID data files were removed"
18 | IF EXIST target\ExampleXAResource1.xid_ exit -1
19 | IF EXIST target\ExampleXAResource2.xid_ exit -1
20 |
21 | echo "Service recovery example succeeded"
22 |
23 |
--------------------------------------------------------------------------------
/atsintegration/src/main/java/com/arjuna/jta/distributed/example/resources/TestSynchronization.java:
--------------------------------------------------------------------------------
1 | package com.arjuna.jta.distributed.example.resources;
2 |
3 | import jakarta.transaction.Synchronization;
4 |
5 | /**
6 | * This is a simple Synchronization, any knowledge (such as the server name) it
7 | * has of the rest of the example is purely for debugging. It should be
8 | * considered a black box.
9 | */
10 | public class TestSynchronization implements Synchronization {
11 | private String localServerName;
12 |
13 | public TestSynchronization(String localServerName) {
14 | this.localServerName = localServerName;
15 | }
16 |
17 | @Override
18 | public void beforeCompletion() {
19 | System.out.println(" TestSynchronization (" + localServerName + ") beforeCompletion");
20 | }
21 |
22 | @Override
23 | public void afterCompletion(int status) {
24 | System.out.println(" TestSynchronization (" + localServerName + ") afterCompletion");
25 | }
26 | }
--------------------------------------------------------------------------------
/compensating-transactions/non-transactional_resource/src/main/java/org/jboss/narayana/quickstarts/nonTransactionalResource/bookService/BookService.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.nonTransactionalResource.bookService;
2 |
3 | import org.jboss.narayana.compensations.api.Compensatable;
4 |
5 | import jakarta.inject.Inject;
6 | import java.util.concurrent.atomic.AtomicInteger;
7 |
8 | /**
9 | * @author paul.robinson@redhat.com 02/08/2013
10 | */
11 | public class BookService {
12 |
13 | @Inject
14 | PackageDispatcher packageDispatcher;
15 |
16 | @Inject
17 | InvoicePrinter invoicePrinter;
18 |
19 | private static AtomicInteger orderId = new AtomicInteger(0);
20 |
21 | @Compensatable
22 | public void buyBook(String item, String address) {
23 |
24 | packageDispatcher.dispatch(item, address);
25 | invoicePrinter.print(orderId.getAndIncrement(), "Invoice body would go here, blah blah blah");
26 |
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/jta-1_2-standalone/README.md:
--------------------------------------------------------------------------------
1 | Standalone JTA 1.2 example.
2 | ===
3 |
4 | Author: Gytis Trikleris, Ondra Chaloupka
5 | Level: Intermediate
6 | Technologies: JTA, CDI
7 |
8 | What is it?
9 | ---
10 |
11 | This example demonstrates how to use JTA 1.2 annotations and CDI beans in standalone application.
12 |
13 | JTA 1.2 introduces annotations for controlling the transactional behaviour of CDI beans.
14 | This quickstart indicate how to take advantage of these annotations in a standalone application
15 | (ie in environments where a Java EE container is either not available or is undesirable).
16 |
17 |
18 | System requirements
19 | ---
20 |
21 | All you need to build this project is Java 8 (Java SDK 1.8) or better and Maven 3.3.3 or better.
22 |
23 |
24 | Build and Deploy the Quickstart
25 | ---
26 |
27 | 1. Open a command line and navigate to the root directory of this quickstart.
28 | 2. Execute quickstart:
29 |
30 | ```
31 | mvn clean test
32 | ```
33 |
--------------------------------------------------------------------------------
/ArjunaJTA/jakartaee_transactional_app/src/main/webapp/template.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 | Customer Database
12 |
13 |
14 |
15 |
16 |
17 | Customer Database
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/ArjunaJTA/jakartaee_transactional_app/src/main/webapp/addCustomer.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | Name:
13 |
14 |
16 |
17 |
18 |
19 | List customers
20 | List count
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/ArjunaJTS/interop/test-ejbs/src/main/webapp/WEB-INF/jboss-ejb3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 | SessionBean
15 | ejbtest/SessionBean
16 |
17 |
18 |
--------------------------------------------------------------------------------
/XTS/raw-xts-api-demo/core/src/main/java/com/jboss/jbosstm/xts/demo/theatre/ITheatreServiceAT.java:
--------------------------------------------------------------------------------
1 | package com.jboss.jbosstm.xts.demo.theatre;
2 |
3 | import jakarta.jws.WebMethod;
4 | import jakarta.jws.WebParam;
5 | import jakarta.jws.WebService;
6 | import jakarta.jws.soap.SOAPBinding;
7 |
8 |
9 | /**
10 | * This class was generated by the JAX-WS RI.
11 | * JAX-WS RI 2.1.2-hudson-182-RC1
12 | * Generated source version: 2.0
13 | *
14 | */
15 | @WebService(name = "ITheatreServiceAT", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Theatre")
16 | @SOAPBinding(style = SOAPBinding.Style.RPC)
17 | public interface ITheatreServiceAT {
18 |
19 |
20 | /**
21 | *
22 | * @param howMany
23 | * @param whichArea
24 | */
25 | @WebMethod
26 | public void bookSeats(
27 | @WebParam(name = "how_many", partName = "how_many")
28 | int howMany,
29 | @WebParam(name = "which_area", partName = "which_area")
30 | int whichArea);
31 |
32 | }
--------------------------------------------------------------------------------
/ArjunaJTA/jakartaee_transactional_app/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | /addCustomer.xhtml
7 |
8 | #{customerManager.addCustomer(name)}
9 | customerAdded
10 | /customers.xhtml
11 |
12 |
13 |
14 | #{customerManager.addCustomer(name)}
15 | customerDuplicate
16 | /duplicate.xhtml
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/compensating-transactions/non-transactional_resource/src/main/java/org/jboss/narayana/quickstarts/nonTransactionalResource/bookService/InvoicePrinter.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.nonTransactionalResource.bookService;
2 |
3 | import org.jboss.narayana.compensations.api.TxCompensate;
4 |
5 | import jakarta.inject.Inject;
6 |
7 | /**
8 | * @author paul.robinson@redhat.com 02/08/2013
9 | */
10 | public class InvoicePrinter {
11 |
12 | @Inject
13 | InvoiceData invoiceData;
14 |
15 | public static boolean hasInk = true;
16 |
17 | @TxCompensate(DestroyInvoice.class)
18 | public void print(Integer invoiceId, String invoiceBody) {
19 |
20 | if (!hasInk) {
21 | throw new RuntimeException("Printer has run out of ink. Unable to print invoice");
22 | }
23 |
24 | invoiceData.setInvoiceBody(invoiceBody);
25 | invoiceData.setInvoiceId(invoiceId);
26 |
27 | System.out.println("Printing the invoice ready for posting...");
28 | }
29 |
30 | }
--------------------------------------------------------------------------------
/spring/camel-with-narayana-spring-boot/src/main/java/org/jboss/narayana/quickstart/spring/User.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstart.spring;
2 |
3 | import jakarta.persistence.Entity;
4 | import jakarta.persistence.GeneratedValue;
5 | import jakarta.persistence.GenerationType;
6 | import jakarta.persistence.Id;
7 |
8 | /**
9 | * @author
2 |
6 |
7 |
8 |
9 |
10 | List of customers
11 |
12 |
13 |
14 | Name
15 |
16 |
17 |
18 |
19 |
20 | Id
21 |
22 |
23 |
24 |
25 | Go Back
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/XTS/wsat-jta-multi_hop/src/test/resources/arquillian.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 | target/
11 |
12 |
13 |
14 |
15 |
16 | ${modular.jdk.args} ${server.jvm.args}
17 | standalone-xts.xml
18 | ${node.address}
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/XTS/raw-xts-api-demo/rpc/src/main/dd/jboss/jaxrpc-mapping.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 | com.arjuna.xts.nightout.services.Restaurant
8 | http://www.jboss.com/jbosstm/xts/demo/Restaurant
9 |
10 |
11 | com.arjuna.xts.nightout.services.Theatre
12 | http://www.jboss.com/jbosstm/xts/demo/Theatre
13 |
14 |
15 | com.arjuna.xts.nightout.services.Taxi
16 | http://www.jboss.com/jbosstm/xts/demo/Taxi
17 |
18 |
--------------------------------------------------------------------------------
/compensating-transactions/non-transactional_resource/src/main/java/org/jboss/narayana/quickstarts/nonTransactionalResource/bookService/InvoiceData.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.nonTransactionalResource.bookService;
2 |
3 | import org.jboss.narayana.compensations.api.Compensatable;
4 | import org.jboss.narayana.compensations.api.CompensationScoped;
5 |
6 | import java.io.Serializable;
7 |
8 | /**
9 | * @author paul.robinson@redhat.com 02/08/2013
10 | */
11 | @CompensationScoped
12 | public class InvoiceData implements Serializable {
13 |
14 | private Integer invoiceId;
15 | private String invoiceBody;
16 |
17 | public Integer getInvoiceId() {
18 |
19 | return invoiceId;
20 | }
21 |
22 | public void setInvoiceId(Integer invoiceId) {
23 |
24 | this.invoiceId = invoiceId;
25 | }
26 |
27 | public String getInvoiceBody() {
28 |
29 | return invoiceBody;
30 | }
31 |
32 | public void setInvoiceBody(String invoiceBody) {
33 |
34 | this.invoiceBody = invoiceBody;
35 | }
36 | }
--------------------------------------------------------------------------------
/XTS/raw-xts-api-demo/core/src/main/java/com/jboss/jbosstm/xts/demo/restaurant/IRestaurantServiceBA.java:
--------------------------------------------------------------------------------
1 | package com.jboss.jbosstm.xts.demo.restaurant;
2 |
3 | import jakarta.jws.WebMethod;
4 | import jakarta.jws.WebParam;
5 | import jakarta.jws.WebResult;
6 | import jakarta.jws.WebService;
7 | import jakarta.jws.soap.SOAPBinding;
8 |
9 |
10 | /**
11 | * This class was generated by the JAX-WS RI.
12 | * JAX-WS RI 2.1.2-hudson-182-RC1
13 | * Generated source version: 2.0
14 | *
15 | */
16 | @WebService(name = "IRestaurantServiceBA", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Restaurant")
17 | @SOAPBinding(style = SOAPBinding.Style.RPC)
18 | public interface IRestaurantServiceBA {
19 |
20 |
21 | /**
22 | *
23 | * @param howMany
24 | * @return
25 | * returns boolean
26 | */
27 | @WebMethod
28 | @WebResult(name = "bookSeatsBAResponse", partName = "bookSeatsBAResponse")
29 | public boolean bookSeats(
30 | @WebParam(name = "how_many", partName = "how_many")
31 | int howMany);
32 |
33 | }
--------------------------------------------------------------------------------
/ArjunaJTS/recovery/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # ALLOW JOBS TO BE BACKGROUNDED
4 | set -m
5 |
6 | echo "Running recovery quickstart"
7 |
8 | # if you want to test using the sun orb you
9 | OPENJDK_CONFIG="-Dcom.sun.CORBA.POA.ORBServerId=1 -Dcom.sun.CORBA.POA.ORBPersistentServerPort=12567"
10 |
11 | [ "x$QUICKSTART_NARAYANA_VERSION" != 'x' ] &&\
12 | NARAYANA_VERSION_PARAM="-Dversion.narayana=${QUICKSTART_NARAYANA_VERSION}"
13 |
14 | echo "Generating a recovery record ..."
15 | mvn -e exec:java -Dexec.mainClass=Test -Dexec.args="-crash" $OPENJDK_CONFIG $NARAYANA_VERSION_PARAM
16 |
17 | echo "Recovering failed service - this could take up to a minute or so ..."
18 | mvn -e exec:java -Dexec.mainClass=Test -Dexec.args="-recover -auto" $OPENJDK_CONFIG $NARAYANA_VERSION_PARAM
19 |
20 | XID1="target/ExampleXAResource1.xid_"
21 | XID2="target/ExampleXAResource2.xid_"
22 |
23 | echo "Testing that the XID data files were removed"
24 |
25 | if [ -f $XID1 -a -f $XID2 ]; then
26 | echo "JTS example failed"
27 | exit -1
28 | else
29 | echo "JTS example passed"
30 | fi
31 |
--------------------------------------------------------------------------------
/XTS/raw-xts-api-demo/rpc/src/main/dd/jboss/client-jaxrpc-mapping.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 | com.arjuna.xts.nightout.clients.jboss.restaurant
8 | http://www.jboss.com/jbosstm/xts/demo/Restaurant
9 |
10 |
11 | com.arjuna.xts.nightout.clients.jboss.theatre
12 | http://www.jboss.com/jbosstm/xts/demo/Theatre
13 |
14 |
15 | com.arjuna.xts.nightout.clients.jboss.taxi
16 | http://www.jboss.com/jbosstm/xts/demo/Taxi
17 |
18 |
--------------------------------------------------------------------------------
/rts/at/service/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 4.0.0
5 |
6 | org.jboss.narayana.quickstart.rts
7 | restat-quickstarts
8 | 7.3.4.Final-SNAPSHOT
9 |
10 | service-quickstarts
11 | RESTAT Service Quickstarts
12 | Provides examples of how to create REST based transactional services
13 | pom
14 |
15 |
16 |
17 |
18 |
19 |
20 | org.jboss.resteasy
21 | resteasy-core
22 |
23 |
24 |
25 |
26 | service1
27 | service2
28 |
29 |
--------------------------------------------------------------------------------
/wildfly/setCheckedActionFactoryExample/src/main/webapp/checkedActionFactoryExample.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | test
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/XTS/wsat-jta-multi_hop/src/test/java/org/jboss/narayana/quickstarts/wsat/jtabridge/fromjta/FirstClient.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.wsat.jtabridge.fromjta;
2 |
3 | import org.jboss.narayana.quickstarts.wsat.jtabridge.first.jaxws.FirstServiceAT;
4 |
5 | import javax.xml.namespace.QName;
6 | import jakarta.xml.ws.Service;
7 | import java.net.URL;
8 |
9 | /**
10 | * @author paul.robinson@redhat.com, 2012-05-03
11 | */
12 | public class FirstClient {
13 |
14 | public static FirstServiceAT newInstance() throws Exception {
15 | URL wsdlLocation = new URL("http://localhost:8080/bridge/FirstServiceATService/FirstServiceAT?wsdl");
16 | QName serviceName = new QName("http://www.jboss.org/narayana/quickstarts/wsat/simple/first", "FirstServiceATService");
17 | QName portName = new QName("http://www.jboss.org/narayana/quickstarts/wsat/simple/first", "FirstServiceAT");
18 |
19 | Service service = Service.create(wsdlLocation, serviceName);
20 | FirstServiceAT client = service.getPort(portName, FirstServiceAT.class);
21 |
22 | return client;
23 | }
24 | }
--------------------------------------------------------------------------------
/rts/at/annotation/common-service/src/main/java/io/narayana/sra/demo/constant/ServiceConstant.java:
--------------------------------------------------------------------------------
1 | package io.narayana.sra.demo.constant;
2 |
3 | public class ServiceConstant {
4 | public static final String HOTEL_PATH = "/hotel";
5 | public static final String HOTEL_NAME_PARAM = "hotelName";
6 | public static final String HOTEL_BEDS_PARAM = "beds";
7 |
8 | public static final String FLIGHT_PATH = "/flight";
9 | public static final String FLIGHT_NUMBER_PARAM = "flightNumber";
10 | public static final String ALT_FLIGHT_NUMBER_PARAM = "altFlightNumber";
11 | public static final String FLIGHT_SEATS_PARAM = "flightSeats";
12 |
13 | public static final String TRIP_PATH = "/trip";
14 | public static final String SERVICE_PORT_PROPERTY = "quarkus.http.port";
15 |
16 | public static final String HOTEL_SERVICE_PORT_PROPERTY = "hotel.quarkus.http.port";
17 |
18 | public static final String FLIGHT_SERVICE_PORT_PROPERTY = "flight.quarkus.http.port";
19 |
20 | public static final String BOOKING_ID = "bookingId";
21 | public static final String SRA_ID = "sraId";
22 | }
23 |
--------------------------------------------------------------------------------
/XTS/wsat-jta-multi_service/src/test/java/org/jboss/narayana/quickstarts/wsat/jtabridge/fromjta/FirstClient.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.wsat.jtabridge.fromjta;
2 |
3 | import org.jboss.narayana.quickstarts.wsat.jtabridge.first.jaxws.FirstServiceAT;
4 |
5 | import javax.xml.namespace.QName;
6 | import jakarta.xml.ws.Service;
7 | import java.net.URL;
8 |
9 | /**
10 | * @author paul.robinson@redhat.com, 2012-05-03
11 | */
12 | public class FirstClient {
13 |
14 | public static FirstServiceAT newInstance() throws Exception {
15 | URL wsdlLocation = new URL("http://localhost:8080/bridge/FirstServiceATService/FirstServiceAT?wsdl");
16 | QName serviceName = new QName("http://www.jboss.org/narayana/quickstarts/wsat/simple/first", "FirstServiceATService");
17 | QName portName = new QName("http://www.jboss.org/narayana/quickstarts/wsat/simple/first", "FirstServiceAT");
18 |
19 | Service service = Service.create(wsdlLocation, serviceName);
20 | FirstServiceAT client = service.getPort(portName, FirstServiceAT.class);
21 |
22 | return client;
23 | }
24 | }
--------------------------------------------------------------------------------
/XTS/raw-xts-api-demo/test/src/test/resources/arquillian.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 | ${jbossHome}
9 | standalone-xts.xml
10 | ${modular.jdk.args} ${server.jvm.args}
11 | ${node0:127.0.0.1}
12 |
13 |
14 |
15 | 60000
16 | 60000
17 | 60000
18 | 60000
19 |
20 |
--------------------------------------------------------------------------------
/XTS/wsat-jta-multi_hop/src/main/java/org/jboss/narayana/quickstarts/wsat/jtabridge/second/SecondClient.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.wsat.jtabridge.second;
2 |
3 | import org.jboss.narayana.quickstarts.wsat.jtabridge.second.jaxws.SecondServiceAT;
4 |
5 | import javax.xml.namespace.QName;
6 | import jakarta.xml.ws.Service;
7 | import java.net.URL;
8 |
9 | /**
10 | * @author paul.robinson@redhat.com, 2012-05-03
11 | */
12 | public class SecondClient {
13 |
14 | public static SecondServiceAT newInstance() throws Exception {
15 | URL wsdlLocation = new URL("http://localhost:8080/bridge/SecondServiceATService/SecondServiceAT?wsdl");
16 | QName serviceName = new QName("http://www.jboss.org/narayana/quickstarts/wsat/simple/second", "SecondServiceATService");
17 | QName portName = new QName("http://www.jboss.org/narayana/quickstarts/wsat/simple/second", "SecondServiceAT");
18 |
19 | Service service = Service.create(wsdlLocation, serviceName);
20 | SecondServiceAT client = service.getPort(portName, SecondServiceAT.class);
21 |
22 | return client;
23 | }
24 | }
--------------------------------------------------------------------------------
/spring/jta/README.md:
--------------------------------------------------------------------------------
1 | Integration with Narayana and Spring
2 | ==================================================================================================
3 | Author: Amos Feng;
4 | Level: Intermediate;
5 | Technologies: JTA, JTS, Spring
6 |
7 | What is it?
8 | -----------
9 |
10 | The jta example shows how to config the narayana transaction manager with spring annotation.
11 |
12 |
13 |
14 | System requirements
15 | -------------------
16 |
17 | All you need to build this project is Java 7.0 (Java SDK 1.7) or better and Maven 3.0 or better.
18 |
19 |
20 | Build and Run the Spring JTA Quickstart
21 | -------------------------------
22 |
23 | 1. Open a command line and navigate to the root directory of this quickstart.
24 | * Build and run the tests:
25 |
26 | mvn clean install
27 | * Run the commit example
28 |
29 | java -jar jta/target/spring-jta.jar
30 | * Run the recovery example
31 |
32 | java -jar jta/target/spring-jta.jar -f
33 | java -jar jta/target/spring-jta.jar -r
34 | * Check the database after recovery
35 |
36 | java -jar jta/target/spring-jta.jar -c
37 |
--------------------------------------------------------------------------------
/XTS/wsat-jta-multi_service/src/test/java/org/jboss/narayana/quickstarts/wsat/jtabridge/fromjta/SecondClient.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.wsat.jtabridge.fromjta;
2 |
3 | import org.jboss.narayana.quickstarts.wsat.jtabridge.second.jaxws.SecondServiceAT;
4 |
5 | import javax.xml.namespace.QName;
6 | import jakarta.xml.ws.Service;
7 | import java.net.URL;
8 |
9 | /**
10 | * @author paul.robinson@redhat.com, 2012-05-03
11 | */
12 | public class SecondClient {
13 |
14 | public static SecondServiceAT newInstance() throws Exception {
15 | URL wsdlLocation = new URL("http://localhost:8180/bridge/SecondServiceATService/SecondServiceAT?wsdl");
16 | QName serviceName = new QName("http://www.jboss.org/narayana/quickstarts/wsat/simple/second", "SecondServiceATService");
17 | QName portName = new QName("http://www.jboss.org/narayana/quickstarts/wsat/simple/second", "SecondServiceAT");
18 |
19 | Service service = Service.create(wsdlLocation, serviceName);
20 | SecondServiceAT client = service.getPort(portName, SecondServiceAT.class);
21 |
22 | return client;
23 | }
24 | }
--------------------------------------------------------------------------------
/ArjunaJTS/interop/resource/src/main/java/org/jboss/narayana/ASFailureType.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Specification of when to inject a failure
7 | */
8 | public enum ASFailureType implements Serializable
9 | {
10 | NONE
11 |
12 | ,PRE_PREPARE // do something before prepare is called
13 |
14 | ,XARES_START // failures specific to the XA protocol
15 | ,XARES_END
16 | ,XARES_PREPARE
17 | ,XARES_ROLLBACK
18 | ,XARES_COMMIT
19 | ,XARES_RECOVER
20 | ,XARES_FORGET
21 |
22 | ,SYNCH_BEFORE // do something before completion
23 | ,SYNCH_AFTER
24 | ;
25 |
26 | public static ASFailureType toEnum(String type)
27 | {
28 | return ASFailureType.valueOf(type.toUpperCase());
29 | }
30 |
31 | public boolean isXA()
32 | {
33 | return name().startsWith("XARES");
34 | }
35 |
36 | public boolean isSynchronization()
37 | {
38 | return name().startsWith("SYNCH");
39 | }
40 |
41 | public boolean isPreCommit()
42 | {
43 | return equals(PRE_PREPARE);
44 | }
45 | }
--------------------------------------------------------------------------------
/jta-1_2-in-wildfly/src/main/java/org/jboss/narayana/quickstarts/jta/QuickstartEntity.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.jta;
2 |
3 | import jakarta.persistence.Entity;
4 | import jakarta.persistence.GeneratedValue;
5 | import jakarta.persistence.GenerationType;
6 | import jakarta.persistence.Id;
7 |
8 | /**
9 | * @author Gytis Trikleris
10 | */
11 | @Entity
12 | public class QuickstartEntity {
13 |
14 | @Id
15 | @GeneratedValue(strategy = GenerationType.AUTO)
16 | private Long id;
17 |
18 | private String name;
19 |
20 | public QuickstartEntity() {
21 | }
22 |
23 | public QuickstartEntity(String name) {
24 | this.name = name;
25 | }
26 |
27 | public Long getId() {
28 | return id;
29 | }
30 |
31 | public void setId(Long id) {
32 | this.id = id;
33 | }
34 |
35 | public boolean isTransient() {
36 | return this.id == null;
37 | }
38 |
39 | public String getName() {
40 | return name;
41 | }
42 |
43 | public void setName(String name) {
44 | this.name = name;
45 | }
46 | }
--------------------------------------------------------------------------------
/ArjunaJTS/interop/test-ejbs/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
11 |
12 | jakarta.ws.rs.core.Application
13 | 1
14 |
15 |
16 | jakarta.ws.rs.core.Application
17 | /rs/*
18 |
19 |
20 |
--------------------------------------------------------------------------------
/compensating-transactions/mongodb-simple/src/main/java/org/jboss/narayana/quickstarts/mongodb/simple/CreditData.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.mongodb.simple;
2 |
3 | import org.jboss.narayana.compensations.api.CompensationScoped;
4 |
5 | import java.io.Serializable;
6 |
7 | /**
8 | * This is a CompensationScoped POJO that is used to store data against the current running compensating transaction.
9 | *
10 | * This scope is also available to the compensation handlers.
11 | *
12 | * @author paul.robinson@redhat.com 09/01/2014
13 | */
14 | @CompensationScoped
15 | public class CreditData implements Serializable {
16 |
17 | private String toAccount;
18 | private Double amount;
19 |
20 | public CreditData() {}
21 |
22 | public void setToAccount(String toAccount) {
23 |
24 | this.toAccount = toAccount;
25 | }
26 |
27 | public void setAmount(Double amount) {
28 |
29 | this.amount = amount;
30 | }
31 |
32 | public String getToAccount() {
33 |
34 | return toAccount;
35 | }
36 |
37 | public Double getAmount() {
38 |
39 | return amount;
40 | }
41 | }
--------------------------------------------------------------------------------
/rts/at/recovery/recovery2/src/main/java/quickstart/WorkDeserializer.java:
--------------------------------------------------------------------------------
1 | package quickstart;
2 |
3 | import org.jboss.narayana.rest.integration.api.Participant;
4 | import org.jboss.narayana.rest.integration.api.ParticipantDeserializer;
5 |
6 | import java.io.ObjectInputStream;
7 |
8 | // REST-AT transactions obey ACID properties and for a
9 | // participant to be durable it must be serializable
10 | // Participants are serialized if they successfully prepare
11 | public class WorkDeserializer implements ParticipantDeserializer {
12 | @Override
13 | public Participant deserialize(ObjectInputStream objectInputStream) {
14 | try {
15 | Object object = objectInputStream.readObject();
16 | if (object instanceof Participant) {
17 | return (Participant) object;
18 | }
19 | } catch (Exception e) {
20 | System.err.printf("Cannot deserialize into Work: %s\n", e.getMessage());
21 | }
22 |
23 | return null;
24 | }
25 |
26 | @Override
27 | public Participant recreate(byte[] recoveryState) {
28 | return null;
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/rts/at/service/service2/src/main/java/quickstart/WorkDeserializer.java:
--------------------------------------------------------------------------------
1 | package quickstart;
2 |
3 | import org.jboss.narayana.rest.integration.api.Participant;
4 | import org.jboss.narayana.rest.integration.api.ParticipantDeserializer;
5 |
6 | import java.io.ObjectInputStream;
7 |
8 | // REST-AT transactions obey ACID properties and for a
9 | // participant to be durable it must be serializable
10 | // Participants are serialized if they successfully prepare
11 | public class WorkDeserializer implements ParticipantDeserializer {
12 | @Override
13 | public Participant deserialize(ObjectInputStream objectInputStream) {
14 | try {
15 | Object object = objectInputStream.readObject();
16 | if (object instanceof Participant) {
17 | return (Participant) object;
18 | }
19 | } catch (Exception e) {
20 | System.err.printf("Cannot deserialize into Work: %s\n", e.getMessage());
21 | }
22 |
23 | return null;
24 | }
25 |
26 | @Override
27 | public Participant recreate(byte[] recoveryState) {
28 | return null;
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/compensating-transactions/mongodb-simple/src/main/java/org/jboss/narayana/quickstarts/mongodb/simple/DebitData.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.mongodb.simple;
2 |
3 | import org.jboss.narayana.compensations.api.CompensationScoped;
4 |
5 | import java.io.Serializable;
6 |
7 | /**
8 | * This is a CompensationScoped POJO that is used to store data against the current running compensating transaction.
9 | *
10 | * This scope is also available to the compensation handlers.
11 | *
12 | * @author paul.robinson@redhat.com 09/01/2014
13 | */
14 | @CompensationScoped
15 | public class DebitData implements Serializable {
16 |
17 | private String fromAccount;
18 | private Double amount;
19 |
20 | public DebitData() {}
21 |
22 | public void setFromAccount(String fromAccount) {
23 |
24 | this.fromAccount = fromAccount;
25 | }
26 |
27 | public void setAmount(Double amount) {
28 |
29 | this.amount = amount;
30 | }
31 |
32 | public String getFromAccount() {
33 |
34 | return fromAccount;
35 | }
36 |
37 | public Double getAmount() {
38 |
39 | return amount;
40 | }
41 | }
--------------------------------------------------------------------------------
/compensating-transactions/mongodb-simple/src/main/java/org/jboss/narayana/quickstarts/mongodb/simple/Resources.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.mongodb.simple;
2 |
3 | import com.mongodb.DB;
4 | import com.mongodb.MongoClient;
5 |
6 | import jakarta.enterprise.inject.Produces;
7 | import jakarta.enterprise.inject.spi.InjectionPoint;
8 |
9 | /**
10 | * A simple class for managing the lifecycle of the MongoDB connection and making it available for CDI injection.
11 | *
12 | * @author paul.robinson@redhat.com 12/04/2014
13 | */
14 | public class Resources {
15 |
16 | /**
17 | * This producer method acts as a factory for creating DB instances used to interact with the MongoDB server.
18 | *
19 | * WARNING: this pattern is not recommended as creates a new connection for every injection point and never cleans
20 | * up connections.
21 | *
22 | * @param injectionPoint
23 | * @return
24 | */
25 | @Produces
26 | public DB produceDB(InjectionPoint injectionPoint) {
27 | MongoClient mongo = new MongoClient("localhost", 27017);
28 | return mongo.getDB("test");
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/XTS/raw-xts-api-demo/rpc/src/main/java/com/arjuna/mw/wst/service/JaxRPCSubordinateHeaderContextProcessor.java:
--------------------------------------------------------------------------------
1 | package com.arjuna.mw.wst.service;
2 |
3 | import javax.xml.rpc.handler.Handler;
4 | import javax.xml.rpc.handler.MessageContext;
5 | import javax.xml.rpc.handler.soap.SOAPMessageContext;
6 | import jakarta.xml.soap.SOAPMessage;
7 |
8 | /**
9 | * The class is used to perform WS-Transaction context insertion
10 | * and extraction for application level SOAP messages using JaxRPC.
11 | */
12 | public class JaxRPCSubordinateHeaderContextProcessor extends JaxRPCHeaderContextProcessor implements Handler
13 | {
14 | /**
15 | * Handle the request.
16 | * @param messageContext The current message context.
17 | */
18 | public boolean handleRequest(final MessageContext messageContext)
19 | {
20 | final SOAPMessageContext soapMessageContext = (SOAPMessageContext)messageContext ;
21 | final SOAPMessage soapMessage = soapMessageContext.getMessage() ;
22 |
23 | // the generic handler can do the job for us -- just pass the correct flag
24 |
25 | return handleInboundMessage(soapMessage, false);
26 | }
27 | }
--------------------------------------------------------------------------------
/compensating-transactions/README.md:
--------------------------------------------------------------------------------
1 | Compensating Transactions Quickstarts
2 | =====================================
3 |
4 | These examples demonstrate the use of our API for developing applications that use Compensating Transactions. This API
5 | provides an alternative to ACID transactions which is often a good alternative in situations where ACID is not apropriate,
6 | yet some of the transactional guarantees are still required.
7 |
8 | See the following series of articles for a fuller description of when to use compensating transactions: http://jbossts.blogspot.co.uk/2013/05/compensating-transactions-when-acid-is.html
9 |
10 |
11 | Non-transactional Resource
12 | --------------
13 | This simple example shows how a non-transactional activity (such as sending an email, or printing a document) can be coordinated
14 | in a compensating transaction.
15 |
16 |
17 | Travel Agent
18 | ------------
19 | This more complex example shows how a long running compensating transaction can be composed of a series of short-running
20 | ACID transactions. The example also involves multiple organisations and forms a distributed transaction over Web Services.
21 |
22 |
--------------------------------------------------------------------------------
/XTS/raw-xts-api-demo/core/src/main/java/com/jboss/jbosstm/xts/demo/theatre/ITheatreServiceBA.java:
--------------------------------------------------------------------------------
1 | package com.jboss.jbosstm.xts.demo.theatre;
2 |
3 | import jakarta.jws.WebMethod;
4 | import jakarta.jws.WebParam;
5 | import jakarta.jws.WebResult;
6 | import jakarta.jws.WebService;
7 | import jakarta.jws.soap.SOAPBinding;
8 |
9 |
10 | /**
11 | * This class was generated by the JAX-WS RI.
12 | * JAX-WS RI 2.1.2-hudson-182-RC1
13 | * Generated source version: 2.0
14 | *
15 | */
16 | @WebService(name = "ITheatreServiceBA", targetNamespace = "http://www.jboss.com/jbosstm/xts/demo/Theatre")
17 | @SOAPBinding(style = SOAPBinding.Style.RPC)
18 | public interface ITheatreServiceBA {
19 |
20 |
21 | /**
22 | *
23 | * @param howMany
24 | * @param whichArea
25 | * @return
26 | * returns boolean
27 | */
28 | @WebMethod
29 | @WebResult(name = "bookSeatsBAResponse", partName = "bookSeatsBAResponse")
30 | public boolean bookSeats(
31 | @WebParam(name = "how_many", partName = "how_many")
32 | int howMany,
33 | @WebParam(name = "which_area", partName = "which_area")
34 | int whichArea);
35 |
36 | }
--------------------------------------------------------------------------------
/XTS/wsat-jta-multi_hop/src/main/java/org/jboss/narayana/quickstarts/wsat/jtabridge/first/FirstCounterEntity.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.wsat.jtabridge.first;
2 |
3 | import jakarta.persistence.Entity;
4 | import jakarta.persistence.Id;
5 | import java.io.Serializable;
6 |
7 | /**
8 | * @author paul.robinson@redhat.com, 2012-05-03
9 | */
10 | @Entity
11 | public class FirstCounterEntity implements Serializable {
12 |
13 | private int id;
14 | private int counter;
15 |
16 | public FirstCounterEntity() {
17 | }
18 |
19 | public FirstCounterEntity(int id, int initialCounterValue) {
20 | this.id = id;
21 | this.counter = initialCounterValue;
22 | }
23 |
24 | @Id
25 | public int getId() {
26 | return id;
27 | }
28 |
29 | public void setId(int id) {
30 | this.id = id;
31 | }
32 |
33 | public int getCounter() {
34 | return counter;
35 | }
36 |
37 | public void setCounter(int counter) {
38 | this.counter = counter;
39 | }
40 |
41 | public void incrementCounter(int howMany) {
42 | setCounter(getCounter() + howMany);
43 | }
44 | }
--------------------------------------------------------------------------------
/XTS/wsat-jta-multi_service/src/main/java/org/jboss/narayana/quickstarts/wsat/jtabridge/first/FirstCounterEntity.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.wsat.jtabridge.first;
2 |
3 | import jakarta.persistence.Entity;
4 | import jakarta.persistence.Id;
5 | import java.io.Serializable;
6 |
7 | /**
8 | * @author paul.robinson@redhat.com, 2012-05-03
9 | */
10 | @Entity
11 | public class FirstCounterEntity implements Serializable {
12 |
13 | private int id;
14 | private int counter;
15 |
16 | public FirstCounterEntity() {
17 | }
18 |
19 | public FirstCounterEntity(int id, int initialCounterValue) {
20 | this.id = id;
21 | this.counter = initialCounterValue;
22 | }
23 |
24 | @Id
25 | public int getId() {
26 | return id;
27 | }
28 |
29 | public void setId(int id) {
30 | this.id = id;
31 | }
32 |
33 | public int getCounter() {
34 | return counter;
35 | }
36 |
37 | public void setCounter(int counter) {
38 | this.counter = counter;
39 | }
40 |
41 | public void incrementCounter(int howMany) {
42 | setCounter(getCounter() + howMany);
43 | }
44 | }
--------------------------------------------------------------------------------
/jta-and-hibernate-standalone/src/main/java/org/jboss/narayana/quickstart/jta/EntityManagerFactoryProducer.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstart.jta;
2 |
3 | import jakarta.annotation.PostConstruct;
4 | import jakarta.enterprise.inject.Disposes;
5 | import jakarta.enterprise.inject.Produces;
6 | import jakarta.inject.Singleton;
7 | import jakarta.persistence.EntityManagerFactory;
8 | import jakarta.persistence.Persistence;
9 |
10 | /**
11 | * CDI producer of the EntityManagerFactory.
12 | *
13 | * @author Gytis Trikleris
14 | */
15 | @Singleton
16 | public class EntityManagerFactoryProducer {
17 |
18 | private EntityManagerFactory entityManagerFactory;
19 |
20 | @PostConstruct
21 | public void postConstruct() {
22 | entityManagerFactory = Persistence.createEntityManagerFactory("quickstart-persistence-unit");
23 | }
24 |
25 | @Produces
26 | public EntityManagerFactory createEntityManagerFactory() {
27 | return entityManagerFactory;
28 | }
29 |
30 | public void close(@Disposes EntityManagerFactory entityManagerFactory) {
31 | entityManagerFactory.close();
32 | }
33 | }
--------------------------------------------------------------------------------
/XTS/raw-xts-api-demo/test/src/test/resources/logging.properties:
--------------------------------------------------------------------------------
1 |
2 | # Additional logger names to configure (root logger is always configured)
3 | loggers=sun.rmi,org.jboss.shrinkwrap
4 | logger.org.jboss.shrinkwrap.level=INFO
5 | logger.sun.rmi.level=WARNING
6 |
7 | # Root logger level
8 | logger.level=DEBUG
9 |
10 | # Root logger handlers
11 | logger.handlers=FILE, CONSOLE
12 |
13 | # Console handler configuration
14 | handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
15 | handler.CONSOLE.properties=autoFlush
16 | handler.CONSOLE.level=INFO
17 | handler.CONSOLE.autoFlush=true
18 | handler.CONSOLE.formatter=PATTERN
19 |
20 | # File handler configuration
21 | handler.FILE=org.jboss.logmanager.handlers.FileHandler
22 | handler.FILE.level=DEBUG
23 | handler.FILE.properties=autoFlush,fileName
24 | handler.FILE.autoFlush=true
25 | handler.FILE.fileName=./target/test.log
26 | handler.FILE.formatter=PATTERN
27 |
28 | # Formatter pattern configuration
29 | formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter
30 | formatter.PATTERN.properties=pattern
31 | formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n
32 |
33 |
34 | logger.sun.rmi
35 |
--------------------------------------------------------------------------------
/XTS/wsat-jta-multi_hop/src/main/java/org/jboss/narayana/quickstarts/wsat/jtabridge/second/SecondCounterEntity.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.wsat.jtabridge.second;
2 |
3 | import jakarta.persistence.Entity;
4 | import jakarta.persistence.Id;
5 | import java.io.Serializable;
6 |
7 | /**
8 | * @author paul.robinson@redhat.com, 2012-05-03
9 | */
10 | @Entity
11 | public class SecondCounterEntity implements Serializable {
12 |
13 | private int id;
14 | private int counter;
15 |
16 | public SecondCounterEntity() {
17 | }
18 |
19 | public SecondCounterEntity(int id, int initialCounterValue) {
20 | this.id = id;
21 | this.counter = initialCounterValue;
22 | }
23 |
24 | @Id
25 | public int getId() {
26 | return id;
27 | }
28 |
29 | public void setId(int id) {
30 | this.id = id;
31 | }
32 |
33 | public int getCounter() {
34 | return counter;
35 | }
36 |
37 | public void setCounter(int counter) {
38 | this.counter = counter;
39 | }
40 |
41 | public void incrementCounter(int howMany) {
42 | setCounter(getCounter() + howMany);
43 | }
44 | }
--------------------------------------------------------------------------------
/ArjunaJTA/recovery/src/main/java/org/jboss/narayana/jta/quickstarts/recovery/RecoverySetup.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.jta.quickstarts.recovery;
2 |
3 |
4 | import org.jboss.narayana.jta.quickstarts.util.Util;
5 |
6 | import com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean;
7 | import com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean;
8 | import com.arjuna.ats.arjuna.recovery.RecoveryManager;
9 | import com.arjuna.common.internal.util.propertyservice.BeanPopulator;
10 |
11 | public class RecoverySetup {
12 | protected static RecoveryManager recoveryManager;
13 |
14 | public static void startRecovery() {
15 | BeanPopulator.getDefaultInstance(ObjectStoreEnvironmentBean.class).setObjectStoreDir(Util.recoveryStoreDir);
16 | RecoveryManager.delayRecoveryManagerThread() ;
17 | BeanPopulator.getDefaultInstance(RecoveryEnvironmentBean.class).setRecoveryBackoffPeriod(1);
18 | recoveryManager = RecoveryManager.manager();
19 | }
20 |
21 | public static void stopRecovery() {
22 | recoveryManager.terminate();
23 | }
24 |
25 | protected void runRecoveryScan() {
26 | recoveryManager.scan();
27 | }
28 | }
--------------------------------------------------------------------------------
/XTS/wsat-jta-multi_service/src/main/java/org/jboss/narayana/quickstarts/wsat/jtabridge/second/SecondCounterEntity.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.wsat.jtabridge.second;
2 |
3 | import jakarta.persistence.Entity;
4 | import jakarta.persistence.Id;
5 | import java.io.Serializable;
6 |
7 | /**
8 | * @author paul.robinson@redhat.com, 2012-05-03
9 | */
10 | @Entity
11 | public class SecondCounterEntity implements Serializable {
12 |
13 | private int id;
14 | private int counter;
15 |
16 | public SecondCounterEntity() {
17 | }
18 |
19 | public SecondCounterEntity(int id, int initialCounterValue) {
20 | this.id = id;
21 | this.counter = initialCounterValue;
22 | }
23 |
24 | @Id
25 | public int getId() {
26 | return id;
27 | }
28 |
29 | public void setId(int id) {
30 | this.id = id;
31 | }
32 |
33 | public int getCounter() {
34 | return counter;
35 | }
36 |
37 | public void setCounter(int counter) {
38 | this.counter = counter;
39 | }
40 |
41 | public void incrementCounter(int howMany) {
42 | setCounter(getCounter() + howMany);
43 | }
44 | }
--------------------------------------------------------------------------------
/XTS/wsat-jta-multi_service/src/main/java/org/jboss/narayana/quickstarts/wsat/jtabridge/first/jaxws/FirstServiceAT.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.wsat.jtabridge.first.jaxws;
2 |
3 | import jakarta.ejb.Remote;
4 | import jakarta.jws.WebMethod;
5 | import jakarta.jws.WebService;
6 | import jakarta.jws.soap.SOAPBinding;
7 |
8 | /**
9 | * Interface to a simple First. Provides simple methods to manipulate bookings.
10 | *
11 | * @author paul.robinson@redhat.com, 2012-01-04
12 | */
13 | @WebService(name = "FirstServiceAT", targetNamespace = "http://www.jboss.org/narayana/quickstarts/wsat/simple/first")
14 | @SOAPBinding(style = SOAPBinding.Style.RPC)
15 | @Remote
16 | public interface FirstServiceAT {
17 |
18 | /**
19 | * Create a new booking
20 | */
21 | @WebMethod
22 | public void incrementCounter(int numSeats);
23 |
24 | /**
25 | * obtain the number of existing bookings
26 | *
27 | * @return the number of current bookings
28 | */
29 | @WebMethod
30 | public int getCounter();
31 |
32 | /**
33 | * Reset the booking count to zero
34 | */
35 | @WebMethod
36 | public void resetCounter();
37 |
38 | }
--------------------------------------------------------------------------------
/atsintegration/src/main/java/com/arjuna/jta/distributed/example/server/impl/ProxyXAResourceDeserializer.java:
--------------------------------------------------------------------------------
1 | package com.arjuna.jta.distributed.example.server.impl;
2 |
3 | import java.io.IOException;
4 | import java.io.ObjectInputStream;
5 |
6 | import javax.transaction.xa.XAResource;
7 |
8 | import com.arjuna.ats.jta.recovery.SerializableXAResourceDeserializer;
9 |
10 | /**
11 | * This is an additional recovery helper that allows a transport to provide a
12 | * deserializer for its ProxyXAResource. We need this as otherwise the
13 | * transaction manager would not be able to see the transports classes. Check
14 | * out the Javadocs on {@link SerializableXAResourceDeserializer}
15 | */
16 | public class ProxyXAResourceDeserializer implements SerializableXAResourceDeserializer {
17 |
18 | @Override
19 | public boolean canDeserialze(String className) {
20 | if (className.equals(ProxyXAResource.class.getName())) {
21 | return true;
22 | } else {
23 | return false;
24 | }
25 | }
26 |
27 | @Override
28 | public XAResource deserialze(ObjectInputStream ois) throws IOException, ClassNotFoundException {
29 | return (XAResource) ois.readObject();
30 | }
31 |
32 | }
--------------------------------------------------------------------------------
/XTS/wsat-jta-multi_hop/src/main/java/org/jboss/narayana/quickstarts/wsat/jtabridge/second/jaxws/SecondServiceAT.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.wsat.jtabridge.second.jaxws;
2 |
3 | import jakarta.ejb.Remote;
4 | import jakarta.jws.WebMethod;
5 | import jakarta.jws.WebService;
6 | import jakarta.jws.soap.SOAPBinding;
7 |
8 | /**
9 | * Interface to a simple Second. Provides simple methods to manipulate bookings.
10 | *
11 | * @author paul.robinson@redhat.com, 2012-01-04
12 | */
13 | @WebService(name = "SecondServiceAT", targetNamespace = "http://www.jboss.org/narayana/quickstarts/wsat/simple/second")
14 | @SOAPBinding(style = SOAPBinding.Style.RPC)
15 | @Remote
16 | public interface SecondServiceAT {
17 |
18 | /**
19 | * Create a new booking
20 | */
21 | @WebMethod
22 | public void incrementCounter(int numSeats);
23 |
24 | /**
25 | * obtain the number of existing bookings
26 | *
27 | * @return the number of current bookings
28 | */
29 | @WebMethod
30 | public int getCounter();
31 |
32 | /**
33 | * Reset the booking count to zero
34 | */
35 | @WebMethod
36 | public void resetCounter();
37 |
38 | }
--------------------------------------------------------------------------------
/XTS/wsat-jta-multi_service/src/main/java/org/jboss/narayana/quickstarts/wsat/jtabridge/second/jaxws/SecondServiceAT.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstarts.wsat.jtabridge.second.jaxws;
2 |
3 | import jakarta.ejb.Remote;
4 | import jakarta.jws.WebMethod;
5 | import jakarta.jws.WebService;
6 | import jakarta.jws.soap.SOAPBinding;
7 |
8 | /**
9 | * Interface to a simple Second. Provides simple methods to manipulate bookings.
10 | *
11 | * @author paul.robinson@redhat.com, 2012-01-04
12 | */
13 | @WebService(name = "SecondServiceAT", targetNamespace = "http://www.jboss.org/narayana/quickstarts/wsat/simple/second")
14 | @SOAPBinding(style = SOAPBinding.Style.RPC)
15 | @Remote
16 | public interface SecondServiceAT {
17 |
18 | /**
19 | * Create a new booking
20 | */
21 | @WebMethod
22 | public void incrementCounter(int numSeats);
23 |
24 | /**
25 | * obtain the number of existing bookings
26 | *
27 | * @return the number of current bookings
28 | */
29 | @WebMethod
30 | public int getCounter();
31 |
32 | /**
33 | * Reset the booking count to zero
34 | */
35 | @WebMethod
36 | public void resetCounter();
37 |
38 | }
--------------------------------------------------------------------------------
/spring/camel-with-narayana-spring-boot/src/main/java/org/jboss/narayana/quickstart/spring/JmsConfig.java:
--------------------------------------------------------------------------------
1 | package org.jboss.narayana.quickstart.spring;
2 |
3 | import org.apache.activemq.artemis.api.core.SimpleString;
4 | import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
5 | import org.springframework.boot.autoconfigure.jms.artemis.ArtemisConfigurationCustomizer;
6 | import org.springframework.boot.context.properties.ConfigurationProperties;
7 | import org.springframework.context.annotation.Configuration;
8 |
9 | /**
10 | * @author