zhfeng commented on code in PR #123: URL: https://github.com/apache/camel-quarkus-examples/pull/123#discussion_r1032358409
########## jms-jpa/README.adoc: ########## @@ -0,0 +1,184 @@ += JMS and JPA: A Camel Quarkus example +:cq-example-description: An example that shows how to run a Camel Quarkus application that supports JTA transactions on three external transactional resources: a database (MySQL), a messaging broker (Artemis) and a simulated XAResource which can demonstrate the commit, rollback and crash recovery. + +{cq-description} + +We use Narayana as the standalone JTA Transaction Manager implementation, and Hibernate as the JPA Adapter. + +This example will connect to a database with the connection details defined in `application.properties`. +If the example is run on Development mode and no database exists, Quarkus will create a matching database +https://quarkus.io/guides/datasource#dev-services[as described here]. + +TIP: Check the https://camel.apache.org/camel-quarkus/latest/first-steps.html[Camel Quarkus User guide] for prerequisites +and other general information. + +NOTE: The Narayana `node.identifier` is very important when you scale up in the cloud environment. It must be unique for each node. You can set it by using `quarkus.transaction-manager.node-name` property which the default value is `quarkus`. + +== Start in the Development mode + +[source,shell] +---- +$ mvn clean compile quarkus:dev +---- + +The above command compiles the project, starts the application and lets the Quarkus tooling watch for changes in your +workspace. Any modifications in your project will automatically take effect in the running application. + +TIP: Please refer to the Development mode section of +https://camel.apache.org/camel-quarkus/latest/first-steps.html#_development_mode[Camel Quarkus User guide] for more details. + +== Package and run the application + +Once you are done with developing you may want to package and run the application. + +TIP: Find more details about the JVM mode and Native mode in the Package and run section of +https://camel.apache.org/camel-quarkus/latest/first-steps.html#_package_and_run_the_application[Camel Quarkus User guide] + +==== External systems + +Start MySQL: +[source, shell] +---- +docker run --name db-mysql \ + -e MYSQL_ROOT_PASSWORD=root \ + -d -p 3306:3306 mysql + +docker exec -it db-mysql mysql -uroot -proot -e \ + "CREATE DATABASE testdb CHARACTER SET utf8mb4; + CREATE USER 'admin'@'%' IDENTIFIED WITH mysql_native_password BY 'admin'; + GRANT ALL ON testdb.* TO 'admin'@'%'; Review Comment: yeah, thanks for pointing it out. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org