diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..fced0225
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,26 @@
+target
+.project
+.classpath
+.settings
+.checkstyle
+*.iml
+.idea
+jboss-as
+jboss-eap
+*.swp
+*~
+
+wildfly-*.zip
+wildfly-*/
+
+*.orig
+qa/ext/log4j.jar
+qa/ext/netty.jar
+qa/TaskImpl.properties
+.DS_Store
+ObjectStore/
+CosServices.cfg
+audit.log
+*.zip
+*.db
+*.json
\ No newline at end of file
diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java
new file mode 100644
index 00000000..84d1e60d
--- /dev/null
+++ b/.mvn/wrapper/MavenWrapperDownloader.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.Authenticator;
+import java.net.PasswordAuthentication;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+
+public final class MavenWrapperDownloader
+{
+ private static final String WRAPPER_VERSION = "3.2.0";
+
+ private static final boolean VERBOSE = Boolean.parseBoolean( System.getenv( "MVNW_VERBOSE" ) );
+
+ public static void main( String[] args )
+ {
+ log( "Apache Maven Wrapper Downloader " + WRAPPER_VERSION );
+
+ if ( args.length != 2 )
+ {
+ System.err.println( " - ERROR wrapperUrl or wrapperJarPath parameter missing" );
+ System.exit( 1 );
+ }
+
+ try
+ {
+ log( " - Downloader started" );
+ final URL wrapperUrl = new URL( args[0] );
+ final String jarPath = args[1].replace( "..", "" ); // Sanitize path
+ final Path wrapperJarPath = Paths.get( jarPath ).toAbsolutePath().normalize();
+ downloadFileFromURL( wrapperUrl, wrapperJarPath );
+ log( "Done" );
+ }
+ catch ( IOException e )
+ {
+ System.err.println( "- Error downloading: " + e.getMessage() );
+ if ( VERBOSE )
+ {
+ e.printStackTrace();
+ }
+ System.exit( 1 );
+ }
+ }
+
+ private static void downloadFileFromURL( URL wrapperUrl, Path wrapperJarPath )
+ throws IOException
+ {
+ log( " - Downloading to: " + wrapperJarPath );
+ if ( System.getenv( "MVNW_USERNAME" ) != null && System.getenv( "MVNW_PASSWORD" ) != null )
+ {
+ final String username = System.getenv( "MVNW_USERNAME" );
+ final char[] password = System.getenv( "MVNW_PASSWORD" ).toCharArray();
+ Authenticator.setDefault( new Authenticator()
+ {
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication()
+ {
+ return new PasswordAuthentication( username, password );
+ }
+ } );
+ }
+ try ( InputStream inStream = wrapperUrl.openStream() )
+ {
+ Files.copy( inStream, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING );
+ }
+ log( " - Downloader complete" );
+ }
+
+ private static void log( String msg )
+ {
+ if ( VERBOSE )
+ {
+ System.out.println( msg );
+ }
+ }
+
+}
diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 00000000..cb28b0e3
Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 00000000..02656afe
--- /dev/null
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.8/apache-maven-3.8.8-bin.zip
+distributionSha256Sum=2e181515ce8ae14b7a904c40bb4794831f5fd1d9641107a13b916af15af4001a
+wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
diff --git a/.mvn/wrapper/settings.xml b/.mvn/wrapper/settings.xml
new file mode 100644
index 00000000..6c648241
--- /dev/null
+++ b/.mvn/wrapper/settings.xml
@@ -0,0 +1,296 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ httpscentral
+
+ true
+
+
+
+ central
+ https://repo1.maven.org/maven2
+
+
+
+
+ central
+ https://repo1.maven.org/maven2
+
+ true
+
+
+
+
+
+ httpsdownloadjavanet
+
+ true
+
+
+
+ download-java-net
+ https://download.java.net/maven/2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
diff --git a/API.adoc b/API.adoc
index efb4278c..823e53b3 100644
--- a/API.adoc
+++ b/API.adoc
@@ -1,4 +1,4 @@
-= Versioning of Narayna LRA REST API
+= Versioning of Narayana LRA REST API
The goal of this document is summarize the approach to REST API versioning
in Narayana LRA coordinator service.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..175abfc3
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,148 @@
+# Contributing guide
+
+Want to contribute? Great!
+
+We try to make it easy, and all contributions, even the smaller ones, are more than welcome.
+This includes bug reports, fixes, documentation, examples...
+
+If you are looking for an issue to work on and haven't had much previous experience with Narayana then you could choose one that has the label [good-first-issue or hacktoberfest](https://issues.redhat.com/browse/JBTM-2493?filter=12421681) or one whose "Estimated Difficulty" field is `Low`. For Hacktoberfest we have created a zulip stream called [hacktoberfest](https://narayana.zulipchat.com/#narrow/stream/406889-hacktoberfest/topic/stream.20events/near/393204842) for discussions. If you want to take an issue then ping a team member (or add a message to the zulip stream) and we will update the assignee field.
+
+On the other hand, if you are set to tackle a big, complicated issue or an issue that will have a high impact on the code base, it is highly recommended to follow the [Request for enhancement (RFE) [workflow](https://github.com/jbosstm/narayana-proposals/blob/main/README.md). Choosing to employ this workflow before starting the development of the selected RFE will help the Narayana core team and yourself to clarify the requirements, the constraints, and the overall design to tackle the issue in advance. In other words, employing the RFE workflow will make sure that the Narayana core team and yourself are on the same page before starting coding.
+
+But first, read this page.
+
+We use a four step process for contributions:
+
+1. Fork the project repository to your own GitHub account.
+1. Commit your changes to your fork.
+1. Create a GitHub Pull Request for your change, following the instructions in the pull request template.
+1. Perform a Code Review with the project maintainers on the pull request.
+
+## Certificate of Origin and License
+
+All files in this repository are subject to the Apache 2.0 license.
+
+By contributing to this project you agree to the [Developer Certificate of Origin (DCO)](https://developercertificate.org/). The DCO was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution (we adopt the "CoreOS method" approach to using the DCO in which there is no per-commit signoff ceremony).
+
+There are copies of the [license](LICENSE) and [DCO](dco.txt) in the root directory of this repository.
+
+New files MUST include the project SPDX License Identifier (Apache-2.0), for example Java files would include:
+
+```
+/*
+ Copyright The Narayana Authors
+ SPDX-License-Identifier: Apache-2.0
+ */
+```
+
+Please use comment characters appropriate to the file you are creating. We also ask contributors *not* to include `@author` tags.
+
+Although copyright notices on contributions are not strictly necessary we do ask contributors to include the above text; code authors still receive attribution for their contribution via the information contained in the git commit metadata.
+
+## Reporting an issue
+
+If you believe you found a bug (and all software has bugs) we'll need to know how to reproduce it, what you are seeing and what you would expect to see.
+To report the issue use the [JBTM issue tracker](https://issues.redhat.com/projects/JBTM). Fill in as many fields as are relevant including the following:
+
+- *Affects Version/s*: The version where you found the issue.
+- *Fix Version/s*: Leave this field blank, the engineer who fixes the issue will set the correct version when the PR is merged.
+- *Component/s*: The components relevant to the problem. Leave the field blank if you're not sure which components are affected.
+
+Don't forget to indicate which version of Narayana, Java and Maven you are using.
+
+Additionally, for more involved items of work, if you are able to estimate the work required to fix the issue or RFE please provide, as best you can, details using the following fields:
+
+- *Original and Remaining Estimate* for estimating resources
+- *Estimated Difficulty* for estimating complexity
+
+## Making open source more inclusive
+
+Red Hat is committed to eradicating problematic language in all of our interactions, including code, documentation, web properties, etc (https://www.redhat.com/en/blog/making-open-source-more-inclusive-eradicating-problematic-language). Although the Narayana project has no plans to retrospectively update its materials we do ask that all contributors be cognizant of the language they use in all communications related to Narayana.
+
+### Building main
+
+See the [README](README.md) file in the root directory of the repository.
+
+## Before you contribute
+
+### Guidelines
+
+We follow [Open source participation guidelines](https://www.redhat.com/en/resources/open-source-participation-guidelines-overview).
+
+We expect all contributors and users to follow our [Contributor Covenant](https://www.contributor-covenant.org/version/1/4/code-of-conduct/) when communicating through project channels. These include, but are not limited to: chat, issues, code.
+
+#### Coding Guidelines
+
+We use the maven `checkstyle` and `sortpom` plugins which are enabled by default and skipped in certain cases for older modules.
+
+For older modules where checkstyle is disabled, when editing a file you should either
+a) follow the style currently used in the file you have edited or,
+b) reformat it according to our checkstyle ruleset (by temporarily enabling checkstyle
+on the affected module) but separate functional changes from formatting changes into different commits
+in the same PR (this rule facilitates traceability).
+In other words a file (in a module with checkstyle disabled) may only be re-formatted if it also
+contains a functional change and is made in a separate commit.
+
+Most IDEs allow you to configure a rule file from your IDE settings (for Intelij that would be Settings -> Other Settings -> Checkstyle). The rule file is located the [narayana-checkstyle repo](https://github.com/jbosstm/narayana-checkstyle-config/tree/main/src/main/resources/narayana-checkstyle)
+We do not use `@author` tags in the Javadoc in new code: they are hard to maintain, especially in a very active project, and we use the Git history to track authorship, however GitHub provides [this nice page with your contributions](https://github.com/jbosstm/narayana/graphs/contributors).
+
+Commits should be atomic and semantic. Commits should be squashed before submitting the PR unless the commits are necessary to track different parts of a fix or to separate out formatting only changes from functional changes. Fixup commits can be used temporarily during the review process, to help the reviewer navigate your changeset, but these should be squashed before merging the PR (in order to provide the software with a more meaningful commit history).
+
+To contribute, use GitHub Pull Requests (PRs), from your **own** fork.
+
+When you create a PR, the description field of the PR will include brief instructions on what you need to include.
+But the following guidelines provide a more detailed set of requirements that we have found useful:
+
+1. The Pull Request title is properly formatted: `JBTM-XYZ Subject`
+2. The Pull Request *should* contain a link to the JIRA issue(s) at the start of the PR description (only minor changes to script/text files are exempt from this rule). If the engineer wishes to address multiple issues and they are closely related then they can be addressed in a single PR. The JIRA must contain sufficient information to enable the reader to understand what the issue is, so at a minimum the description field of the JIRA must be present and legible/clear.
+3. Engineers are not allowed to submit PRs which only contain formatting changes. The guidance on formatting code are covered in the [Coding Guidelines](#coding-guidelines) section below.
+4. New PRs are tested against multiple Jenkins CI axes. If you know that a change only affects particular axes then you can disable the ones that aren't required, ask a team member for clarification if you're not sure (or look at how the `PROFILE` variable is used in the CI script `scripts/hudson/narayana.sh`. When you first create a PR, the PR description field contains basic instructions about how to disable a CI test axis.
+5. The engineer raising the PR should have tested their changes prior to submitting the request to merge changes. However, there are some circumstances where this may not be possible in which case you must add the label "Hold" and update the PR description indicating why it isn't ready for review just yet. The policy to add the label "Hold" is a signal to reviewers that the changes are not yet ready to be reviewed.
+
+Also, make sure you have set up your Git authorship correctly:
+
+```
+git config --global user.name "Your Full Name"
+git config --global user.email your.email@example.com
+```
+
+If you use different computers to contribute, please make sure the name is the same on all your computers.
+
+### Code reviews
+
+All submissions, including submissions by project members, should be reviewed before being merged.
+A possible exception is that if a change only effects build scripts or non-source files and is "small" then self review is permitted. But use this option with care to avoid breaking build scripts or the readabilty of text files.
+
+Before asking for a review it's best to wait for [Continuous Integration tests](#continuous-integration) to finish successfully (unless early feedback is being sought).
+
+Once a review has started both parties should attempt to respond to feedback in a timely manner.
+Do not approve the PR until you have either seen a successful CI test of the PR, or you can reasonably explain why a failure is unrelated to the code changes made in the PR (and documented in a PR comment).
+
+### Continuous Integration
+
+To ensure Narayana is stable for everyone, all changes should go through Narayana continuous integration: when you raise a pull request one of the members of the team will schedule a CI run to test your PR.
+Note that when a CI test axis passes there is *no need* to disable further testing of the axis (the danger of doing this is that if further commits are added to the PR then the axis will not be retested).
+
+### Tests and documentation are not optional
+
+Don't forget to include tests in your pull requests.
+Also don't forget the documentation (reference documentation for features, javadoc...).
+
+## Update the issue with the correct release information:
+
+If the change would result in behaviour in Narayana that is incompatible with the current release stream for Narayana, then the relevant JIRA issue `Fix Version/s` must be set to the `.next`. For example if the root pom.xml is currently `1.0.0.Final-SNAPSHOT` then the JIRA issue should have a `Fix Version/s` of `1.next` added.
+
+When the github Pull Request has passed all relevant CI checks and has been Approved by a reviewer the code can be merged. If you don't have permission to do this then ping one of the team who will then merge it. Once merged the issue must be updated in the issue tracker (if you don't have permission then a team member will do this):
+
+1. Press the `Pull Request Closed` button (the status will automatically be set to `Done`)
+2. If the `Fix Version/s` is not set to `.next`, set the `Fix Version/s` field to `.next`
+ Note that this step is vital since the release process only includes issues in the `Done` state and with the correct `.next` field, otherwise your fix will not be included in the next release.
+ Note that if you merge to a branch other than master please ensure that it is a maintenance release (or, in some cases, a topic branch).
+ The release coordinator will update this `Fix Version` field to correspond with the actual version being released.
+ The release coordinator will also move the status of the issue to `Closed` once it's included in a release.
+4. Sanity check that the other fields have been filled in correctly (although these are normally set when the issue is created):
+5. Please provide meaningful release notes so that potential users can see, at a glance, what new things can be expected from the release that contains the fix.
+
+## Release
+
+The Narayana project applies the [Semantic Versioning Specification](https://semver.org/) (SemVer) 2.0.0 to mark its releases.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 00000000..e9e8e042
--- /dev/null
+++ b/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,6 @@
+Thanks for submitting your Pull Request!
+
+Please refer to our [guidelines for making contributions](https://github.com/jbosstm/narayana/blob/main/CONTRIBUTING.md) when creating your pull request. In particular, it helps the reviewer if you ensure that the:
+- [ ] Pull Request title is properly formatted: JBTM-XYZ Subject
+- [ ] Pull Request contains a link to the JIRA issue(s) and that they contain sufficient information for the reviewer to be able to gauge whether or not the proposed changes correctly address the issue
+
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 00000000..ed8c89ed
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,23 @@
+# Reporting of CVEs and Security Issues
+
+## The Narayana community and our sponsor, Red Hat, take security bugs very seriously
+
+We aim to take immediate action to address serious security-related problems that involve our projects.
+
+Note that we will only fix such issues in the most recent minor release of Narayana.
+
+## Reporting of Security Issues
+
+When reporting a security vulnerability it is important to not accidentally broadcast to the world that the issue exists, as this makes it easier for people to exploit it. The software industry uses the term embargo to describe the time a security issue is known internally until it is public knowledge.
+
+Our preferred way of reporting security issues in Narayana is listed below.
+
+### Email the mailing list
+
+The list at narayana-security@redhat.com is the preferred mechanism for outside users to report security issues. A member of the Narayana team will open the required issues.
+
+### Other considerations
+
+If you would like to work with us on a fix for the security vulnerability, please include your GitHub username in the above email, and we will provide you access to a temporary private fork where we can collaborate on a fix without it being disclosed publicly, **including in your own publicly visible git repository**.
+
+Do not open a public issue, send a pull request, or disclose any information about the suspected vulnerability publicly, **including in your own publicly visible git repository**. If you discover any publicly disclosed security vulnerabilities, please notify us immediately through narayana-security@redhat.com
diff --git a/build.sh b/build.sh
new file mode 100755
index 00000000..22e2d492
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,187 @@
+#!/bin/sh
+### ====================================================================== ###
+## ##
+## This is the main entry point for the build system. ##
+## ##
+## Users should execute this file rather than 'mvn' to ensure ##
+## the correct version is being used with the correct configuration. ##
+## ##
+### ====================================================================== ###
+
+# $Id: build.sh 105735 2010-06-04 19:45:13Z pgier $
+
+# Create the bpa if you can
+BPA=
+uname | grep Linux >> /dev/null
+if [ "$?" -ne "1" ]; then
+ uname -a | grep x86_64 >> /dev/null
+ if [ "$?" -ne "1" ]; then
+ BPA="-Dbpa=centos54x64"
+ else
+ BPA="-Dbpa=centos55x32"
+ fi
+ # This is required for the upgrade of g++ https://issues.jboss.org/browse/JBTM-1787
+ if [ -f /etc/fedora-release ]
+ then
+ uname -a | grep x86_64 >> /dev/null
+ if [ "$?" -ne "1" ]; then
+ BPA="-Dbpa=fc18x64"
+ fi
+ fi
+fi
+
+ORIG_WORKING_DIR=`pwd`
+PROGNAME=`basename $0`
+DIRNAME=`dirname $0`
+GREP="grep"
+ROOT="/"
+
+# Ignore user's MAVEN_HOME if it is set (M2_HOME is unsupported since Apache Maven 3.5.0)
+unset M2_HOME
+unset MAVEN_HOME
+
+JAVA_VERSION=$(java -version 2>&1 | grep "\(java\|openjdk\) version" | cut -d\ -f3 | tr -d '"' | tr -d '[:space:]'| awk -F . '{if ($1==1) print $2; else print $1}')
+
+if [ $JAVA_VERSION -eq "9" ]; then
+ MAVEN_OPTS="$MAVEN_OPTS --add-modules java.corba"
+ MAVEN_OPTS="$MAVEN_OPTS --add-modules java.xml.bind"
+ MAVEN_OPTS="$MAVEN_OPTS --add-modules java.xml.ws"
+ export MAVEN_OPTS
+fi
+
+if [ -z "$MAVEN_OPTS" ]
+then
+ if [ $JAVA_VERSION -ge "9" ]; then
+ MAVEN_OPTS="$MAVEN_OPTS -Xms1303m -Xmx1303m"
+ else
+ MAVEN_OPTS="$MAVEN_OPTS -Xms1303m -Xmx1303m -XX:MaxMetaspaceSize=512m"
+ fi
+ export MAVEN_OPTS
+fi
+
+# Default arguments
+MVN_OPTIONS="-B -s \"${DIRNAME}/.mvn/wrapper/settings.xml\" $BPA"
+
+# Use the maximum available, or set MAX_FD != -1 to use that
+MAX_FD="maximum"
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*)
+ cygwin=true
+ ;;
+
+ Darwin*)
+ darwin=true
+ ;;
+esac
+
+#
+# Helper to complain.
+#
+die() {
+ echo "${PROGNAME}: $*"
+ exit 1
+}
+
+#
+# Helper to complain.
+#
+warn() {
+ echo "${PROGNAME}: $*"
+}
+
+#
+# Helper to source a file if it exists.
+#
+source_if_exists() {
+ for file in $*; do
+ if [ -f "$file" ]; then
+ . $file
+ fi
+ done
+}
+
+#
+# Main function.
+#
+main() {
+ # If there is a build config file, source it.
+ source_if_exists "$DIRNAME/build.conf" "$HOME/.build.conf"
+
+ # Increase the maximum file descriptors if we can.
+ if [ $cygwin = "false" ]; then
+ MVN_OPTIONS="$MVN_OPTIONS -Dorson.jar.location=`pwd`/ext/"
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ]; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
+ # Use system's max.
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ]; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+ else
+ MVN_OPTIONS="$MVN_OPTIONS -Dorson.jar.location=`cygpath -w $(pwd)/ext/`"
+ fi
+
+ # Make sure we have one.
+ MVN="${DIRNAME}/mvnw"
+ if [ ! -x "$MVN" ]; then
+ die "Maven binary is not executable: $MVN"
+ fi
+
+ # Need to specify planet57/buildmagic protocol handler package.
+ MVN_OPTS="-Djava.protocol.handler.pkgs=org.jboss.net.protocol"
+
+ # Setup some build properties
+ MVN_OPTS="$MVN_OPTS -Dbuild.script=$0"
+
+ # Change to the directory where the script lives, so users are not forced
+ # to be in the same directory as build.xml.
+ cd $DIRNAME
+
+ MVN_GOAL="";
+ ADDIT_PARAMS="";
+ # For each parameter, check for testsuite directives.
+ for param in "$@" ; do
+ case $param in
+ -*) ADDIT_PARAMS="$ADDIT_PARAMS '$param'";;
+ clean) MVN_GOAL="$MVN_GOAL$param ";;
+ test) MVN_GOAL="$MVN_GOAL$param ";;
+ install) MVN_GOAL="$MVN_GOAL$param ";;
+ deploy) MVN_GOAL="$MVN_GOAL$param ";;
+ site) MVN_GOAL="$MVN_GOAL$param ";;
+ *) ADDIT_PARAMS="$ADDIT_PARAMS '$param'";;
+ esac
+ done
+ # Default goal if none specified.
+ if [ -z "$MVN_GOAL" ]; then MVN_GOAL="install"; fi
+
+ # Export some stuff for maven.
+ export MVN MVN_OPTS MVN_GOAL
+
+ echo "$MVN $MVN_OPTIONS $MVN_GOAL $ADDIT_PARAMS"
+
+ # workaround in case 'mvn -f' is not supported
+ if [ "$PRESERVE_WORKING_DIR" = "true" ]; then cd "$ORIG_WORKING_DIR"; fi
+
+ # Execute in debug mode, or simply execute.
+ if [ "x$MVN_DEBUG" != "x" ]; then
+ eval /bin/sh -x $MVN $MVN_OPTIONS $MVN_GOAL $ADDIT_PARAMS
+ else
+ eval exec $MVN $MVN_OPTIONS $MVN_GOAL $ADDIT_PARAMS
+ fi
+}
+
+##
+## Bootstrap
+##
+main "$@"
diff --git a/client/pom.xml b/client/pom.xml
index 45dd12bb..51218679 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -6,9 +6,9 @@
4.0.0
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-parent
- 7.1.1.Final-SNAPSHOT
+ 0.0.9.Final-SNAPSHOT
../pom.xml
@@ -23,7 +23,7 @@
microprofile-lra-api
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-service-base
diff --git a/coordinator-war/pom.xml b/coordinator-war/pom.xml
index 454b8598..16e65a60 100644
--- a/coordinator-war/pom.xml
+++ b/coordinator-war/pom.xml
@@ -6,9 +6,9 @@
4.0.0
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-parent
- 7.1.1.Final-SNAPSHOT
+ 0.0.9.Final-SNAPSHOT
lra-coordinator-war
@@ -18,7 +18,7 @@
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-coordinator-jar
diff --git a/coordinator/pom.xml b/coordinator/pom.xml
index 33f9a335..01fba342 100644
--- a/coordinator/pom.xml
+++ b/coordinator/pom.xml
@@ -7,9 +7,9 @@
4.0.0
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-parent
- 7.1.1.Final-SNAPSHOT
+ 0.0.9.Final-SNAPSHOT
../pom.xml
@@ -60,7 +60,7 @@
microprofile-fault-tolerance-api
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-service-base
@@ -83,13 +83,18 @@
jakarta.enterprise.cdi-api
provided
+
+ jakarta.servlet
+ jakarta.servlet-api
+ true
+
org.jboss.resteasy
resteasy-jackson2-provider
provided
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-client
test
@@ -108,7 +113,7 @@
provided
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
narayana-lra
test
@@ -122,6 +127,16 @@
h2
test
+
+ org.hamcrest
+ hamcrest
+ test
+
+
+ junit
+ junit
+ test
+
diff --git a/dco.txt b/dco.txt
new file mode 100644
index 00000000..8201f992
--- /dev/null
+++ b/dco.txt
@@ -0,0 +1,37 @@
+Developer Certificate of Origin
+Version 1.1
+
+Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
+1 Letterman Drive
+Suite D4700
+San Francisco, CA, 94129
+
+Everyone is permitted to copy and distribute verbatim copies of this
+license document, but changing it is not allowed.
+
+
+Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+(a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+(b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+(c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+(d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
diff --git a/jaxrs/pom.xml b/jaxrs/pom.xml
index 7a2f1c08..9be727f8 100644
--- a/jaxrs/pom.xml
+++ b/jaxrs/pom.xml
@@ -6,9 +6,9 @@
4.0.0
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-parent
- 7.1.1.Final-SNAPSHOT
+ 0.0.9.Final-SNAPSHOT
../pom.xml
@@ -18,11 +18,11 @@
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-client
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-proxy-api
diff --git a/mvnw b/mvnw
new file mode 100755
index 00000000..41c0f0c2
--- /dev/null
+++ b/mvnw
@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/narayana-release-process.sh b/narayana-release-process.sh
new file mode 100755
index 00000000..82f7f47e
--- /dev/null
+++ b/narayana-release-process.sh
@@ -0,0 +1,128 @@
+#!/bin/bash
+
+# You need to run this script with 2 arguments.
+# Arguments are then tranformed to env varibales CURRENT and NEXT
+# Release process releases version ${CURRENT} and prepares github with commits to ${NEXT}-SNAPSHOT
+#
+# 2 arguments: `./narayana-release-process.sh CURRENT NEXT`
+
+if [ $# -ne 2 ]; then
+ echo 1>&2 "$0: usage: CURRENT NEXT"
+ exit 2
+else
+ CURRENT=$1
+ NEXT=$2
+fi
+
+echo "You will need: VPN, credentials for jbosstm host, jira admin, github permissions on all jbosstm/ repo and nexus permissions."
+echo "By default you will need the ability to upload to a server for hosting the website and downloads."
+echo "Please check the configuration in ~/.m2/settings.xml with repository 'jboss-releases-repository' and correct username/password."
+echo "Until ./scripts/release/update_jira.py -k JBTM -t 5.next -n $CURRENT is fixed you will need to go to https://issues.jboss.org/projects/JBTM?selectedItem=com.atlassian.jira.jira-projects-plugin%3Arelease-page&status=released-unreleased, rename (Actions -> Edit) 5.next to $CURRENT, create a new 5.next version, Actions -> Release on the new $CURRENT."
+read -p "Have you done these steps? y/n " STEPSOK
+if [[ $STEPSOK == n* ]]
+then
+ exit
+fi
+# we want to check if this repo has already been tagged with the same version before
+git fetch upstream --tags
+if [[ $? != 0 ]]; then
+ echo "fetch upstream failed, exiting"
+ exit
+fi
+set +e
+git tag | grep -x $CURRENT
+if [[ $? != 0 ]]
+then
+ read -p "Should the release be aborted if there are local commits (y/n): " ok
+ if [[ $ok == y* ]]; then
+ git status | grep "nothing to commit"
+ if [[ $? != 0 ]]
+ then
+ git status
+ exit
+ fi
+ git status | grep "ahead"
+ if [[ $? != 1 ]]
+ then
+ git status
+ exit
+ fi
+ fi
+ git log -n 5
+ read -p "Did the log before look OK?" ok
+ if [[ $ok == n* ]]
+ then
+ exit
+ fi
+ set -e
+
+ read -p "Until JBTM-3891 is resolved, please review with project team to ensure that it is safe to release. Please check for failed CI jobs before continuing. Continue? y/n " NOBLOCKERS
+ if [[ $NOBLOCKERS == n* ]]
+ then
+ exit
+ fi
+
+ echo "Executing pre-release script, this may be interactive so please stand by"
+ (cd ./scripts/ ; ./pre-release.sh $CURRENT $NEXT)
+ echo "This script is only interactive at the very end now, press enter to continue"
+ read
+ set +e
+ git fetch upstream --tags
+else
+ echo "This script is only interactive at the very end now, press enter to continue"
+ read
+fi
+
+cd ~/tmp/narayana/$CURRENT/sources/documentation/
+git checkout $CURRENT
+if [[ $? != 0 ]]
+then
+ echo 1>&2 documentation: Tag '$CURRENT' did not exist
+ exit
+fi
+
+rm -rf $PWD/localm2repo
+./build.sh clean install -Dmaven.repo.local=${PWD}/localm2repo -Prelease
+if [[ $? != 0 ]]
+then
+ echo 1>&2 Could not clean install documentation
+ exit
+fi
+cd -
+cd ~/tmp/narayana/$CURRENT/sources/narayana/
+git checkout $CURRENT
+if [[ $? != 0 ]]
+then
+ echo 1>&2 narayana: Tag '$CURRENT' did not exist
+ exit
+fi
+MAVEN_OPTS="-XX:MaxPermSize=512m"
+
+if [[ $(uname) == CYGWIN* ]]
+then
+ ORSON_PATH=`cygpath -w $PWD/ext/`
+else
+ ORSON_PATH=$PWD/ext/
+fi
+
+rm -rf $PWD/localm2repo
+# uploaded artifacts go straight live without the ability to close the repo at the end, so the install is done to verify that the build will work
+./build.sh clean install -Dmaven.repo.local=${PWD}/localm2repo -DskipTests -Dorson.jar.location=$ORSON_PATH -Pcommunity
+if [[ $? != 0 ]]
+then
+ echo 1>&2 Could not install narayana
+ exit
+fi
+# It is important in the deploy step that if you are deploying to nexus you provide a reference to your settings file as the ./build.sh overrides the default settings file discovery of Maven. Please see https://github.com/jbosstm/narayana/wiki/Narayana-Release-Process for details of the settings.xml requirements
+./build.sh clean deploy -Dmaven.repo.local=${PWD}/localm2repo -DskipTests -gs ~/.m2/settings.xml -Dorson.jar.location=$ORSON_PATH -Prelease,community -DskipNexusStagingDeployMojo=false
+if [[ $? != 0 ]]
+then
+ echo 1>&2 Could not deploy narayana to nexus
+ exit
+fi
+
+# Post-release steps
+echo "Please visit Narayana CI and check the quickstarts are working with the release and obtain performance numbers for the blog post"
+echo "narayana.io needs updating, please update the narayana.io repository (see https://github.com/jbosstm/narayana.io/blob/develop/README.md)"
+echo "Please open a PR to lra-coordinator-quarkus when the artifact is available on nexus."
+echo "Please raise a Jira and pull request to update WildFly to the released version of Narayana"
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index bc22c5cf..3cbe7db3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,18 +5,28 @@
-->
4.0.0
+
- org.jboss.narayana.rts
- rest-tx
- 7.1.1.Final-SNAPSHOT
- ../pom.xml
+ org.jboss
+ jboss-parent
+ 39
+ org.jboss.narayana.lra
lra-parent
+ 0.0.9.Final-SNAPSHOT
pom
LRA Parent
LRA Parent
+
+
+ Apache-2.0
+ https://www.apache.org/licenses/LICENSE-2.0.html
+ repo
+
+
+
service-base
client
@@ -26,42 +36,372 @@
test
jaxrs
+
+
+ jboss-releases-repository
+ JBoss Release Repository
+ https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/
+
+
+ jboss-snapshots-repository
+ JBoss Snapshot Repository
+ https://repository.jboss.org/nexus/content/repositories/snapshots/
+
+
-
+
+
+
+ ${maven.build.timestamp}
+
+ true
+ -Djboss.bind.address=[::1] -Djboss.bind.address.management=[::1]
+ -Djboss.bind.address.unsecure=[::1] -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true
+ -Dorg.jboss.byteman.verbose
+ -Djboss.modules.system.pkgs=org.jboss.byteman
+ -Dorg.jboss.byteman.transform.all
+ -javaagent:${project.build.directory}/lib/byteman.jar=listener:true
+
+
+
+ -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false
+ -javaagent:${project.build.directory}/lib/jacocoagent.jar=destfile=${project.build.directory}/coverage-reports/jacoco-ut.exec,includes=*,append=true,output=file
+
+
+ -Xms64m -Xmx1024m
+
+ -server
+
+
1.0
+ yyyy/MMM/dd HH:mm
+ 17
+ 17
+
+ 7.1.0.Final
+
UTF-8
+
${jvm.args.other} ${jvm.args.memory} ${jvm.args.debug} ${jvm.args.modular}
true
+ false
+ true
+
+ false
false
+
+ true
+ 4.8.3.1
+ 2.2.224
+
+ 2.2
+ 4.5.14
+ 1.0.1.Final
+
+ 3.2.0
+ 4.0.0
+ 2.0.1
+ 2.1.1
+ 6.0.0
+ 3.1.0
+ 1.10.2.Final
+ 4.13.1
+ 3.6.0
+ 3.1.7
+ 3.0.2
+ 4.0.2
+
+
+ 2.0
+ 1.5.0
+ 3.1
+
+ 0.8.8
+ 1.7.0.Final
+ 7.4.Final
+
+ 4.0.22
+ 3.5.0.Final
+ 2.2.1.Final
+
+ 6.2.5.Final
+ 1.2.6
+ 3.1.4
+ 5.0.1.Final
+ 1.7.0
+ 5.0.0.Final
+ 1.1.3
+ 2.7.0
+ 3.0.0
+ 4.1.0.Final
+
+
- org.jboss.narayana
- narayana-bom-test
+ org.jboss.logging
+ jboss-logging
+ ${version.org.jboss.logging.jboss-logging}
+
+
+ org.jboss.logging
+ jboss-logging-processor
+ ${version.org.jboss.logging.jboss-logging-processor}
+
+
+
+ org.jboss.narayana.arjunacore
+ arjuna
+ ${narayana.version}
+
+
+
+ jakarta.inject
+ jakarta.inject-api
+ ${version.jakarta.inject.jakarta.inject-api}
+
+
+ jakarta.enterprise
+ jakarta.enterprise.cdi-api
+ ${version.jakarta.enterprise}
+
+
+
+
+ jakarta.json
+ jakarta.json-api
+ ${version.jakarta.json-api}
+
+
+ org.eclipse.parsson
+ parsson
+ ${version.parsson}
+ test
+
+
+ jakarta.servlet
+ jakarta.servlet-api
+ ${version.jakarta.servlet.jakarta-servlet-api}
+
+
+
+ org.jboss.modules
+ jboss-modules
+ ${version.jboss-modules}
+
+
+
+
+ org.jboss.resteasy
+ resteasy-client
+ ${version.org.jboss.resteasy}
+
+
+ org.jboss.resteasy
+ resteasy-client
+ ${version.org.jboss.resteasy}
+
+
+ org.jboss.resteasy
+ resteasy-undertow
+ ${version.org.jboss.resteasy}
+
+
+
+
+ jakarta.ws.rs
+ jakarta.ws.rs-api
+ ${version.jakarta.ws.rs.jakarta-ws-rs-api}
+
+
+ org.jboss.narayana.lra
+ lra-client
+ ${project.version}
+
+
+ org.jboss.narayana.lra
+ lra-service-base
${project.version}
- pom
- import
+
+
+ org.jboss.narayana.lra
+ lra-proxy-api
+ ${project.version}
+
+
+ org.jboss.narayana.lra
+ narayana-lra
+ ${project.version}
+
+
+ org.jboss.narayana.lra
+ lra-coordinator-jar
+ ${project.version}
+
+
+ org.jboss.narayana.lra
+ lra-coordinator-war
+ ${project.version}
+ war
+
+
+ org.eclipse.microprofile.config
+ microprofile-config-api
+ ${version.microprofile.config-api}
+
+
+ io.smallrye.config
+ smallrye-config
+ ${version.io.smallrye.smallrye-config}
+
+
+ jakarta.annotation
+ jakarta.annotation-api
+
+
+ jakarta.enterprise
+ jakarta.enterprise.cdi-api
+
+
+
+
+ org.eclipse.microprofile.fault-tolerance
+ microprofile-fault-tolerance-api
+ ${version.microprofile.fault-tolerance}
+
+
+ org.eclipse.microprofile.lra
+ microprofile-lra-api
+ ${version.microprofile.lra}
+
+
+ org.eclipse.microprofile.openapi
+ microprofile-openapi-api
+ ${version.org.eclipse.microprofile.openapi}
+
+
+ org.eclipse.microprofile.lra
+ microprofile-lra-tck
+ ${version.microprofile.lra}
+
+
+ org.jboss.resteasy
+ resteasy-jackson2-provider
+ ${version.org.jboss.resteasy}
+
+
+
+
+ org.jboss.byteman
+ byteman-bmunit
+ ${version.org.jboss.byteman}
+ test
+
+
+ com.h2database
+ h2
+ ${version.com.h2database}
+ test
+
+
+ org.jboss.arquillian.protocol
+ arquillian-protocol-servlet-jakarta
+ ${version.org.jboss.arquillian.core}
+ test
+
+
+
+ org.jboss.byteman
+ byteman-install
+ ${version.org.jboss.byteman}
+ test
+
+
+
+ org.jacoco
+ org.jacoco.agent
+ ${version.org.jacoco}
+ test
+
+
+
+
+ org.jboss.shrinkwrap.resolver
+ shrinkwrap-resolver-api
+ ${version.org.jboss.shrinkwrap.resolvers}
+ test
+
+
+ org.jboss.shrinkwrap.resolver
+ shrinkwrap-resolver-impl-maven
+ ${version.org.jboss.shrinkwrap.resolvers}
+ test
+
+
+ org.jboss.arquillian.junit
+ arquillian-junit-container
+ ${version.org.jboss.arquillian.core}
+ test
+
+
+ org.jboss.shrinkwrap.resolver
+ shrinkwrap-resolver-impl-maven-archive
+ ${version.org.jboss.shrinkwrap.resolvers}
+ test
+
+
+
+ org.jboss.byteman
+ byteman
+ ${version.org.jboss.byteman}
+ test
+
+
+ org.jboss.byteman
+ byteman-submit
+ ${version.org.jboss.byteman}
+ test
+
+
+ junit
+ junit
+ ${version.junit}
+ test
+
+
+
+ org.hamcrest
+ hamcrest
+ ${version.hamcrest}
+ test
+
+
+ org.jboss.narayana.lra
+ lra-test-arquillian-extension
+ ${project.version}
+ test
+
+
+
+ org.jboss.weld.se
+ weld-se-shaded
+ ${version.org.jboss.weld}
+ test
+
+
+
+ org.wildfly.arquillian
+ wildfly-arquillian-container-managed
+ ${version.org.wildfly.arquillian}
+ test
-
-
-
- org.hamcrest
- hamcrest
- test
-
-
- junit
- junit
- test
-
-
@@ -80,13 +420,194 @@
+
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+
+ ${project.build.directory}/dependency-reduced-pom.xml
+
+
+
+ org.codehaus.mojo
+ jboss-maven-plugin
+ ${version.org.codehaus.mojo.jboss-maven-plugin}
+
+
+ org.jboss.as.plugins
+ jboss-as-maven-plugin
+ ${version.org.jboss.as.plugins.jboss-as-maven-plugin}
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.2.0
+
+
+
+ ${project.name}
+ https://www.jboss.org/
+ JBoss by Red Hat, Inc.
+ https://www.jboss.org/
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ ${version.compiler.plugin}
+
+
+
+ -Aorg.jboss.logging.tools.addGeneratedAnnotation=false
+
+
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+
+ ${skipMavenDeployMojo}
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ ${version.org.sonatype.plugins.nexus-staging-maven-plugin}
+ true
+
+ jboss-releases-repository
+ https://repository.jboss.org/nexus/
+ true
+ ${skipNexusStagingDeployMojo}
+
+
+
+ nexus-deploy
+
+ deploy
+
+ deploy
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+
+ *Test.java
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 3.0.0
+
+
+
+ org.eclipse.m2e
+ lifecycle-mapping
+ 1.0.0
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ [2.8,)
+
+ copy-dependencies
+
+
+
+
+
+
+
+
+ org.jboss.byteman
+ byteman-rulecheck-maven-plugin
+ [2.1.3,)
+
+ rulecheck
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ [1.7,)
+
+ run
+
+
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ [1.7,)
+
+ add-source
+
+
+
+
+
+
+
+
+ org.codehaus.mojo
+ idlj-maven-plugin
+ [1.2.1,)
+
+ generate
+ generate-test
+
+
+
+
+
+
+
+
+
+
+
+ io.smallrye
+ jandex-maven-plugin
+ ${version.maven.jandex-plugin}
+
+
+ make-index
+
+ jandex
+
+
+
+
+
+
+
org.sonatype.plugins
nexus-staging-maven-plugin
false
-
org.apache.maven.plugins
maven-failsafe-plugin
@@ -114,24 +635,119 @@
-
+
org.apache.maven.plugins
- maven-surefire-plugin
+ maven-source-plugin
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-checkstyle-plugin
+ ${version.maven.checkstyle-plugin}
-
-
- *Test.java
-
+ narayana-checkstyle/checkstyle.xml
+ narayana-checkstyle/suppressions.xml
+ true
+ true
+ true
+ **/*$logger.java,**/*$bundle.java
+
+
+ ${checkstyle.skip}
+
+
+
+ io.narayana
+ narayana-checkstyle-config
+ ${version.io.narayana.checkstyle-config}
+
+
+
+
+ check-style
+
+ checkstyle
+
+ compile
+
+
+
+
+ com.github.ekryd.sortpom
+ sortpom-maven-plugin
+ ${version.sortpom}
+
+ ${sortpom.skip}
+ false
+ true
+
+
+
+ sort
+
+ verify
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ 1
+ false
+ true
+ true
+ -Djdk.attach.allowAttachSelf=true ${jvm.args.modular}
+
+
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+
+
+ enforce-versions
+
+ enforce
+
+
+
+
+ [17,)
+
+
+
+
+
-
release
+
+
+
+ org.apache.maven.plugins
+ maven-install-plugin
+
+
+ default-install
+ none
+
+
+
+
+
org.apache.maven.plugins
@@ -147,5 +763,216 @@
+
+ codeCoverage
+
+
+ org.jacoco
+ org.jacoco.agent
+ ${version.org.jacoco}
+ test
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${version.org.jacoco}
+
+
+
+ pre-unit-test
+
+ prepare-agent
+
+
+
+ ${project.build.directory}/coverage-reports/jacoco-ut.exec
+
+ surefireArgLine
+
+
+
+
+ post-unit-test
+
+ report
+
+ test
+
+
+ ${project.build.directory}/coverage-reports/jacoco-ut.exec
+
+ ${project.reporting.outputDirectory}/jacoco-ut
+
+
+
+ check
+
+ check
+
+ test
+
+ ${project.build.directory}/coverage-reports/jacoco-ut.exec
+
+
+ BUNDLE
+
+ *Test
+
+
+
+ INSTRUCTION
+ COVEREDRATIO
+ 0.0
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ ${surefireArgLine} ${jvm.args.modular} -Djdk.attach.allowAttachSelf=true -Xss2048k
+
+
+ com.arjuna.ats.arjuna.common.propertiesFile
+ jbossts-properties.xml
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ unpack-jacoco-agent
+
+ unpack-dependencies
+
+ test-compile
+
+ true
+ org.jacoco
+ ${project.build.directory}/lib
+
+
+
+
+
+
+
+
+ debug
+
+
+ debug
+
+
+
+ -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y
+
+
+
+ findbugs
+
+
+
+ com.github.spotbugs
+ spotbugs-maven-plugin
+ ${version.com.github.spotbugs.spotbugs-maven-plugin}
+
+
+ spotbugs
+
+ check
+
+ compile
+
+ false
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-site-plugin
+
+
+
+ com.github.spotbugs
+ spotbugs-maven-plugin
+ ${version.com.github.spotbugs.spotbugs-maven-plugin}
+
+
+
+
+
+ org.apache.maven.doxia
+ doxia-decoration-model
+ ${version.doxia}
+
+
+ org.apache.maven.doxia
+ doxia-skin-model
+ ${version.doxia}
+
+
+ org.apache.maven.doxia
+ doxia-integration-tools
+ ${version.doxia}
+
+
+ org.apache.maven.doxia
+ doxia-site-renderer
+ ${version.doxia}
+
+
+ org.apache.maven.doxia
+ doxia-doc-renderer
+ ${version.doxia}
+
+
+
+
+
+
diff --git a/proxy/api/pom.xml b/proxy/api/pom.xml
index 4c61e053..6717a1a1 100644
--- a/proxy/api/pom.xml
+++ b/proxy/api/pom.xml
@@ -6,9 +6,9 @@
4.0.0
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-proxy-parent
- 7.1.1.Final-SNAPSHOT
+ 0.0.9.Final-SNAPSHOT
../pom.xml
@@ -60,7 +60,7 @@
resteasy-client
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-client
diff --git a/proxy/pom.xml b/proxy/pom.xml
index 25511ce6..273b6ea5 100644
--- a/proxy/pom.xml
+++ b/proxy/pom.xml
@@ -6,9 +6,9 @@
4.0.0
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-parent
- 7.1.1.Final-SNAPSHOT
+ 0.0.9.Final-SNAPSHOT
../pom.xml
diff --git a/proxy/test/pom.xml b/proxy/test/pom.xml
index 6628c806..dab558b8 100644
--- a/proxy/test/pom.xml
+++ b/proxy/test/pom.xml
@@ -6,9 +6,9 @@
4.0.0
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-proxy-parent
- 7.1.1.Final-SNAPSHOT
+ 0.0.9.Final-SNAPSHOT
../pom.xml
@@ -52,14 +52,19 @@
microprofile-lra-api
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-client
test
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-proxy-api
+
+ junit
+ junit
+ test
+
diff --git a/scripts/branch-names.sh b/scripts/branch-names.sh
new file mode 100644
index 00000000..16e31232
--- /dev/null
+++ b/scripts/branch-names.sh
@@ -0,0 +1,2 @@
+export UPSTREAM_AS_BRANCH=main
+export ORIGIN_AS_BRANCH=5_BRANCH
diff --git a/scripts/hudson/hw.sh b/scripts/hudson/hw.sh
new file mode 100755
index 00000000..07de745d
--- /dev/null
+++ b/scripts/hudson/hw.sh
@@ -0,0 +1,24 @@
+
+if [ -x /usr/sbin/system_profiler ]; then
+ sw_vers
+ /usr/sbin/system_profiler
+else
+ set -o xtrace
+
+ uname -a
+ cat /etc/redhat-release
+ java -version
+ free -m
+ cat /proc/cpuinfo
+ cat /proc/meminfo
+ cat /proc/devices
+ cat /proc/scsi/scsi
+ cat /proc/partitions
+#sudo dmidecode --type 17
+
+ lspci
+ lsusb
+ lsblk
+ df
+ mount | column -t | grep ext
+fi
diff --git a/scripts/hudson/narayana-rebase.sh b/scripts/hudson/narayana-rebase.sh
new file mode 100755
index 00000000..66fef673
--- /dev/null
+++ b/scripts/hudson/narayana-rebase.sh
@@ -0,0 +1,68 @@
+function fatal {
+ if [[ -z $PROFILE ]]; then
+ comment_on_pull "Tests failed ($BUILD_URL): $1"
+ else
+ comment_on_pull "$PROFILE profile tests failed ($BUILD_URL): $1"
+ fi
+
+ echo "$1"
+ exit 1
+}
+
+function comment_on_pull
+{
+ if [ "$COMMENT_ON_PULL" = "" ]; then return; fi
+
+ PULL_NUMBER=$(echo $GIT_BRANCH | awk -F 'pull' '{ print $2 }' | awk -F '/' '{ print $2 }')
+ if [ "$PULL_NUMBER" != "" ]
+ then
+ JSON="{ \"body\": \"$1\" }"
+ curl -d "$JSON" -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/$GIT_ACCOUNT/$GIT_REPO/issues/$PULL_NUMBER/comments
+ else
+ echo "Not a pull request, so not commenting"
+ fi
+}
+
+function rebase_narayana {
+ echo "Rebasing Narayana"
+ cd $WORKSPACE
+
+ # Clean up the local repo
+ git rebase --abort
+ rm -rf .git/rebase-apply
+ git clean -f -d -x
+
+ # Work out the branch point
+ git branch -D 4.17
+ git branch 4.17 origin/4.17
+ git branch -D main
+ git branch main origin/main
+ myRev=`git rev-parse HEAD`
+ ancestor417=`git merge-base $myRev 4.17`
+ ancestorMain=`git merge-base $myRev main`
+ if [ `uname` = "Darwin" ]
+ then
+ cutLen=8
+ else
+ cutLen=7
+ fi
+ distanceFromMain=`git log $ancestorMain..$myRev | grep commit | wc | cut -c 1-$cutLen | tr -d ' '`
+ distanceFrom417=`git log $ancestor417..$myRev | grep commit | wc | cut -c 1-$cutLen | tr -d ' '`
+ if [ "$distanceFromMain" -lt "$distanceFrom417" ]
+ then
+ export BRANCHPOINT=main
+ else
+ export BRANCHPOINT=4.17
+ fi
+
+ # Update the pull to head
+ git pull --rebase --ff-only origin $BRANCHPOINT
+
+ if [ $? -ne 0 ]; then
+ #comment_on_pull "Narayana rebase failed. Please rebase it manually."
+ fatal "Narayana rebase on $BRANCHPOINT failed. Please rebase it manually"
+ fi
+}
+
+rebase_narayana "$@"
+exit 0
diff --git a/scripts/hudson/narayana.sh b/scripts/hudson/narayana.sh
new file mode 100755
index 00000000..30146316
--- /dev/null
+++ b/scripts/hudson/narayana.sh
@@ -0,0 +1,470 @@
+#!/bin/bash
+set -x
+
+function fatal {
+ if [[ -z $PROFILE ]]; then
+ comment_on_pull "Tests failed ($BUILD_URL): $1"
+ else
+ comment_on_pull "$PROFILE profile tests failed ($BUILD_URL): $1"
+ fi
+
+ echo "$1"
+ exit 1
+}
+
+function which_java {
+ type -p java 2>&1 > /dev/null
+ if [ $? = 0 ]; then
+ _java=java
+ elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
+ _java="$JAVA_HOME/bin/java"
+ else
+ unset _java
+ fi
+
+ if [[ "$_java" ]]; then
+ version=$("$_java" -version 2>&1 | grep -oP 'version "?(1\.)?\K\d+' || true)
+ echo $version
+ fi
+}
+
+# return 0 if using the IBM java compiler
+function is_ibm {
+ jvendor=$(java -XshowSettings:properties -version 2>&1 | awk -F '"' '/java.vendor = / {print $1}')
+ [[ $jvendor == *"IBM Corporation"* ]]
+}
+
+# check the JDK version and disable the WildFly clone, build and test when its minimum JDK version is higher
+# see https://issues.redhat.com/browse/WFLY-18967
+function wildfly_minimum_jdk {
+ if [ "$_jdk" -lt 17 ]; then
+ echo "WildFly must be built with JDK 17 or greater"
+ export AS_BUILD=0 AS_CLONE=0 AS_TESTS=0 LRA_AS_TESTS=0 ARQ_PROF=no_arq
+ # without AS test results the code coverage does not work, so not running it
+ export CODE_COVERAGE=0
+ fi
+}
+function get_pull_xargs {
+ rval=0
+ res=$(echo $1 | sed 's/\\r\\n/ /g')
+ res=$(echo $res | sed 's/"/ /g')
+ OLDIFS=$IFS
+ IFS=', ' read -r -a array <<< "$res"
+ echo "get_pull_xargs: parsing $1"
+
+ for element in "${array[@]}"
+ do
+ if [[ $element == *"="* ]]; then
+ if [[ $element == "PROFILE="* ]]; then
+ echo "comparing PROFILE=$2 with $element"
+ if [[ ! "PROFILE=$2" == $element ]]; then
+ echo "SKIPING PROFILE $2"
+ rval=1
+ fi
+ else
+ echo "exporting $element"
+ export $element
+ fi
+ fi
+ done
+
+ IFS=$OLDIFS
+
+ return $rval
+}
+
+function init_test_options {
+ is_ibm
+ ISIBM=$?
+
+ _jdk=`which_java`
+ if [ "$_jdk" -lt 17 ]; then
+ fatal "Narayana does not support JDKs less than 17"
+ fi
+
+ [ $LRA_CURRENT_VERSION ] || LRA_CURRENT_VERSION=`awk '/lra-parent/ { while(!//) {getline;} print; }' pom.xml | cut -d \< -f 2|cut -d \> -f 2`
+ [ $CODE_COVERAGE ] || CODE_COVERAGE=0
+ [ x"$CODE_COVERAGE_ARGS" != "x" ] || CODE_COVERAGE_ARGS=""
+ [ $ARQ_PROF ] || ARQ_PROF=arq # IPv4 arquillian profile
+ [ $ENABLE_LRA_TRACE_LOGS ] || ENABLE_LRA_TRACE_LOGS=" -Dtest.logs.to.file=true -Dtrace.lra.coordinator"
+
+ if ! get_pull_xargs "$PULL_DESCRIPTION_BODY" $PROFILE; then # see if the PR description overrides the profile
+ echo "SKIPPING PROFILE=$PROFILE"
+ export COMMENT_ON_PULL=""
+ export AS_BUILD=0 AS_CLONE=0 AS_TESTS=0 NARAYANA_BUILD=0 NARAYANA_TESTS=0
+ export LRA_TESTS=0 LRA_AS_TESTS=0
+ elif [[ $PROFILE == "CORE" ]]; then
+ if [[ ! $PULL_DESCRIPTION_BODY == *!MAIN* ]] && [[ ! $PULL_DESCRIPTION_BODY == *!CORE* ]]; then
+ comment_on_pull "Started testing this pull request with $PROFILE profile: $BUILD_URL"
+ export AS_BUILD=1 AS_CLONE=1 AS_TESTS=0 NARAYANA_BUILD=1 NARAYANA_TESTS=1
+ export LRA_TESTS=0 LRA_AS_TESTS=0
+ else
+ export COMMENT_ON_PULL=""
+ fi
+ elif [[ $PROFILE == "AS_TESTS" ]]; then
+ if [[ ! $PULL_DESCRIPTION_BODY == *!AS_TESTS* ]]; then
+ if [[ "$_jdk" -lt 17 ]]; then
+ fatal "Requested JDK version $_jdk cannot run with axis $PROFILE: please use jdk 17 instead"
+ fi
+ comment_on_pull "Started testing this pull request with $PROFILE profile: $BUILD_URL"
+ export AS_BUILD=0 AS_CLONE=1 AS_TESTS=1 NARAYANA_BUILD=1 NARAYANA_TESTS=0
+ export LRA_TESTS=0 LRA_AS_TESTS=0
+ else
+ export COMMENT_ON_PULL=""
+ fi
+
+ elif [[ $PROFILE == "JACOCO" ]]; then
+ if [[ ! $PULL_DESCRIPTION_BODY == *!JACOCO* ]]; then
+ if [[ "$_jdk" -lt 17 ]]; then
+ fatal "Requested JDK version $_jdk cannot run with axis $PROFILE: please use jdk 17 instead"
+ fi
+ comment_on_pull "Started testing this pull request with JACOCO profile: $BUILD_URL"
+ export AS_BUILD=1 AS_CLONE=1 AS_TESTS=0 NARAYANA_BUILD=1 NARAYANA_TESTS=1
+ export LRA_TESTS=1 LRA_AS_TESTS=0 CODE_COVERAGE=1 CODE_COVERAGE_ARGS="-PcodeCoverage -Pfindbugs"
+ [ -z ${MAVEN_OPTS+x} ] && export MAVEN_OPTS="-Xms2048m -Xmx2048m"
+ else
+ export COMMENT_ON_PULL=""
+ fi
+
+ elif [[ $PROFILE == "LRA" ]]; then
+ if [[ ! $PULL_DESCRIPTION_BODY == *!LRA* ]]; then
+ comment_on_pull "Started testing this pull request with LRA profile: $BUILD_URL"
+ export AS_BUILD=1 AS_CLONE=1 AS_TESTS=0 NARAYANA_BUILD=1 NARAYANA_TESTS=0
+ export LRA_TESTS=1 LRA_AS_TESTS=1
+ else
+ export COMMENT_ON_PULL=""
+ fi
+ else
+ export COMMENT_ON_PULL=""
+ comment_on_pull "Started testing this pull request with $PROFILE profile: $BUILD_URL"
+ fi
+ wildfly_minimum_jdk
+ [ $NARAYANA_TESTS ] || NARAYANA_TESTS=0 # run the narayana surefire tests
+ [ $NARAYANA_BUILD ] || NARAYANA_BUILD=0 # build narayana
+ [ $AS_CLONE ] && [ -z "$WILDFLY_CLONED_REPO" ] || AS_CLONE=0 # git clone the AS repo when WILDFLY_CLONED_REPO is not provided
+ [ $AS_BUILD ] || AS_BUILD=0 # build the AS
+ [ $AS_TESTS ] || AS_TESTS=0 # Run WildFly/JBoss EAP testsuite
+ [ $LRA_AS_TESTS ] || LRA_AS_TESTS=0 #LRA tests
+ [ $LRA_TESTS ] || LRA_TESTS=1 # LRA Test
+
+ [ $REDUCE_SPACE ] || REDUCE_SPACE=0 # Whether to reduce the space used
+
+ get_pull_xargs "$PULL_DESCRIPTION_BODY" $PROFILE # see if the PR description overrides any of the defaults
+
+ JAVA_VERSION=$(java -version 2>&1 | grep "\(java\|openjdk\) version" | cut -d\ -f3 | tr -d '"' | tr -d '[:space:]' | awk -F . '{if ($1==1) print $2; else print $1}')
+}
+
+function initGithubVariables
+{
+ [ "$PULL_NUMBER" = "" ] &&\
+ PULL_NUMBER=$(echo $GIT_BRANCH | awk -F 'pull' '{ print $2 }' | awk -F '/' '{ print $2 }')
+
+ if [ "$PULL_NUMBER" != "" ]
+ then
+ [ "x${PULL_DESCRIPTION}" = "x" ] &&\
+ PULL_DESCRIPTION=$(curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/$GIT_ACCOUNT/$GIT_REPO/pulls/$PULL_NUMBER)
+ [ "x${PULL_DESCRIPTION_BODY}" = "x" ] &&\
+ PULL_DESCRIPTION_BODY=$(printf '%s' "$PULL_DESCRIPTION" | grep \"body\":)
+ else
+ PULL_DESCRIPTION=""
+ PULL_DESCRIPTION_BODY=""
+ fi
+}
+
+function comment_on_pull
+{
+ if [ "$COMMENT_ON_PULL" = "" ]; then echo $1; return; fi
+
+ if [ "$PULL_NUMBER" != "" ]
+ then
+ JSON="{ \"body\": \"$1\" }"
+ curl -d "$JSON" -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/$GIT_ACCOUNT/$GIT_REPO/issues/$PULL_NUMBER/comments
+ else
+ echo "Not a pull request, so not commenting"
+ fi
+}
+
+function check_if_pull_closed
+{
+ if [ "$PULL_NUMBER" != "" ]
+ then
+ if [[ $PULL_DESCRIPTION =~ "\"state\": \"closed\"" ]]
+ then
+ echo "pull closed"
+ exit 0
+ else
+ echo "pull open"
+ fi
+ fi
+}
+
+function check_if_pull_noci_label
+{
+ if [ "$PULL_NUMBER" != "" ]
+ then
+ if [[ $PULL_DESCRIPTION =~ "\"name\": \"NoCI\"" ]]
+ then
+ echo "pull request $PULL_NUMBER is defined with NoCI label, exiting this CI execution"
+ exit 0
+ else
+ echo "NoCI label is not present at the pull request $PULL_NUMBER"
+ fi
+ fi
+}
+
+function build_narayana {
+ echo "Checking if need SPI PR"
+ if [ -n "$SPI_BRANCH" ]; then
+ echo "Building SPI PR"
+ if [ -d jboss-transaction-spi ]; then
+ rm -rf jboss-transaction-spi
+ fi
+ git clone https://github.com/jbosstm/jboss-transaction-spi.git -o jbosstm
+ [ $? -eq 0 ] || fatal "git clone https://github.com/jbosstm/jboss-transaction-spi.git failed"
+ cd jboss-transaction-spi
+ git fetch jbosstm +refs/pull/*/head:refs/remotes/jbosstm/pull/*/head
+ [ $? -eq 0 ] || fatal "git fetch of pulls failed"
+ git checkout $SPI_BRANCH
+ [ $? -eq 0 ] || fatal "git fetch of pull branch failed"
+ cd ../
+ ./build.sh -f jboss-transaction-spi/pom.xml -B clean install
+ [ $? -eq 0 ] || fatal "Build of SPI failed"
+ fi
+
+ echo "Building Narayana"
+ cd $WORKSPACE
+
+ [ $NARAYANA_TESTS = 1 ] && NARAYANA_ARGS= || NARAYANA_ARGS="-DskipTests"
+
+ echo "Using MAVEN_OPTS: $MAVEN_OPTS"
+
+ ./build.sh -B -Prelease,community$OBJECT_STORE_PROFILE $ORBARG "$@" $NARAYANA_ARGS $IPV6_OPTS $CODE_COVERAGE_ARGS clean install
+
+ [ $? -eq 0 ] || fatal "narayana build failed"
+
+ return 0
+}
+
+function clone_as {
+ echo "Cloning AS sources from https://github.com/jbosstm/jboss-as.git"
+
+ cd ${WORKSPACE}
+ if [ -d jboss-as ]; then
+ echo "Using existing checkout of WildFly. If a fresh build should be used, delete the folder ${WORKSPACE}/jboss-as"
+ cd jboss-as
+ else
+ echo "First time checkout of WildFly"
+ git clone https://github.com/jbosstm/jboss-as.git -o jbosstm
+ [ $? -eq 0 ] || fatal "git clone https://github.com/jbosstm/jboss-as.git failed"
+
+ cd jboss-as
+
+ git remote add upstream https://github.com/wildfly/wildfly.git
+
+ [ -z "$AS_BRANCH" ] || git fetch jbosstm +refs/pull/*/head:refs/remotes/jbosstm/pull/*/head
+ [ $? -eq 0 ] || fatal "git fetch of pulls failed"
+ [ -z "$AS_BRANCH" ] || git checkout $AS_BRANCH
+ [ $? -eq 0 ] || fatal "git fetch of pull branch failed"
+ [ -z "$AS_BRANCH" ] || echo "Using non-default AS_BRANCH: $AS_BRANCH"
+
+ git fetch upstream
+ echo "This is the JBoss-AS commit"
+ echo $(git rev-parse upstream/main)
+ echo "This is the AS_BRANCH $AS_BRANCH commit"
+ echo $(git rev-parse HEAD)
+
+ echo "Rebasing the wildfly upstream/main on top of the AS_BRANCH $AS_BRANCH"
+ git pull --rebase upstream main
+ [ $? -eq 0 ] || fatal "git rebase failed"
+
+ if [ $REDUCE_SPACE = 1 ]; then
+ echo "Deleting git dir to reduce disk usage"
+ rm -rf .git
+ fi
+ fi
+
+ WILDFLY_CLONED_REPO=$(pwd)
+ cd $WORKSPACE
+}
+
+function build_as {
+ echo "Building JBoss EAP/WildFly"
+
+ cd $WILDFLY_CLONED_REPO
+
+ WILDFLY_VERSION_FROM_JBOSS_AS=`awk '/wildfly-parent/ { while(!//) {getline;} print; }' ${WILDFLY_CLONED_REPO}/pom.xml | cut -d \< -f 2|cut -d \> -f 2`
+
+ if [ ! -d ${WILDFLY_CLONED_REPO}/dist/target/wildfly-${WILDFLY_VERSION_FROM_JBOSS_AS} ]; then
+
+ # building WildFly
+ export MAVEN_OPTS="-XX:MaxMetaspaceSize=512m $MAVEN_OPTS"
+ JAVA_OPTS="-Xms1303m -Xmx1303m -XX:MaxMetaspaceSize=512m $JAVA_OPTS" ./build.sh clean install -B -DskipTests -Dts.smoke=false $IPV6_OPTS -Dversion.org.jboss.narayana.lra=${LRA_CURRENT_VERSION} "$@"
+ [ $? -eq 0 ] || fatal "AS build failed"
+
+ fi
+
+ echo "AS version is ${WILDFLY_VERSION_FROM_JBOSS_AS}"
+ JBOSS_HOME=${WILDFLY_CLONED_REPO}/dist/target/wildfly-${WILDFLY_VERSION_FROM_JBOSS_AS}
+ export JBOSS_HOME=`echo $JBOSS_HOME`
+
+ # init files under JBOSS_HOME before AS TESTS is started
+ init_jboss_home
+
+ cd $WORKSPACE
+}
+
+function tests_as {
+ # running WildFly testsuite if configured to be run by axis AS_TESTS
+
+ cd $WILDFLY_CLONED_REPO
+ JAVA_OPTS="-Xms1303m -Xmx1303m -XX:MaxMetaspaceSize=512m $JAVA_OPTS" ./build.sh clean install -B -DallTests $IPV6_OPTS -Dversion.org.jboss.narayana.lra=${LRA_CURRENT_VERSION} "$@"
+ [ $? -eq 0 ] || fatal "AS tests failed"
+ cd $WORKSPACE
+}
+
+function init_jboss_home {
+ [ -d $JBOSS_HOME ] || fatal "missing AS - $JBOSS_HOME is not a directory"
+ echo "JBOSS_HOME=$JBOSS_HOME"
+ cp ${JBOSS_HOME}/docs/examples/configs/standalone-xts.xml ${JBOSS_HOME}/standalone/configuration
+ cp ${JBOSS_HOME}/docs/examples/configs/standalone-rts.xml ${JBOSS_HOME}/standalone/configuration
+ # configuring bigger connection timeout for jboss cli (WFLY-13385)
+ CONF="${JBOSS_HOME}/bin/jboss-cli.xml"
+ sed -e 's#^\(.*\)#30000\n\1#' "$CONF" > "$CONF.tmp" && mv "$CONF.tmp" "$CONF"
+ grep 'connection-timeout' "${CONF}"
+ #Enable remote debugger
+ echo JAVA_OPTS='"$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"' >> "$JBOSS_HOME"/bin/standalone.conf
+
+ if [ $AS_TESTS_TRACE ]; then
+ enable_as_trace "$JBOSS_HOME/standalone/configuration/standalone.xml"
+ enable_as_trace "$JBOSS_HOME/standalone/configuration/standalone-full.xml"
+ fi
+}
+
+function lra_as_tests {
+ echo "#-1. LRA AS Tests"
+ cd $WILDFLY_CLONED_REPO
+ ./build.sh -f testsuite/integration/microprofile-tck/lra/pom.xml -fae -B -Dversion.org.jboss.narayana.lra=${LRA_CURRENT_VERSION} "$@" test
+ [ $? -eq 0 ] || fatal "LRA AS Test failed"
+ ./build.sh -f microprofile/lra/pom.xml -fae -B -Dversion.org.jboss.narayana.lra=${LRA_CURRENT_VERSION} "$@" test
+ [ $? -eq 0 ] || fatal "LRA AS Test failed"
+ cd ${WORKSPACE}
+}
+
+function lra_tests {
+ echo "#0. LRA Test"
+ echo "#0. Running LRA tests using $ARQ_PROF profile"
+ # Ideally the following target would be test and integration-test but that doesn't seem to shutdown the server each time
+ PRESERVE_WORKING_DIR=true ./build.sh -fae -B -Pcommunity -P$ARQ_PROF $CODE_COVERAGE_ARGS $ENABLE_LRA_TRACE_LOGS -Dlra.test.timeout.factor="${LRA_TEST_TIMEOUT_FACTOR:-1.5}" "$@" install
+ lra_arq=$?
+ if [ $lra_arq != 0 ] ; then fatal "LRA Test failed with failures in $ARQ_PROF profile" ; fi
+}
+
+
+
+function enable_as_trace {
+ CONF=${1:-"${JBOSS_HOME}/standalone/configuration/standalone-xts.xml"}
+ echo "Enable trace logs for file '$CONF'"
+
+ sed -e '/$/N;s/\n */<\/logger><\/logger><\/logger>/' $CONF > "$CONF.tmp" && mv "$CONF.tmp" "$CONF"
+ sed -e '/$/N;s/\n *//' $CONF > "$CONF.tmp" && mv "$CONF.tmp" "$CONF"
+}
+
+
+function hw_spec {
+ if [ -x /usr/sbin/system_profiler ]; then
+ echo "sw_vers:"; sw_vers
+ echo "system_profiler:"; /usr/sbin/system_profiler
+ else
+ set -o xtrace
+
+ echo "uname -a"; uname -a
+ echo "redhat release:"; cat /etc/redhat-release
+ echo "java version:"; java -version
+ echo "free:"; free -m
+ echo "cpuinfo:"; cat /proc/cpuinfo
+ echo "meminfo:"; cat /proc/meminfo
+ echo "devices:"; cat /proc/devices
+ echo "scsi:"; cat /proc/scsi/scsi
+ echo "partitions:"; cat /proc/partitions
+
+ echo "lspci:"; lspci
+ echo "lsusb:"; lsusb
+ echo "lsblk:"; lsblk
+ echo "df:"; df
+ echo "mount:"; mount | column -t | grep ext
+ fi
+}
+
+
+function generate_code_coverage_report {
+ echo "Generating code coverage report"
+ cd ${WORKSPACE}
+ ./build.sh -B -f code-coverage/pom.xml $CODE_COVERAGE_ARGS "$@" clean install
+ [ $? -eq 0 ] || fatal "Code coverage report generation failed"
+}
+
+ulimit -a
+ulimit -c unlimited
+ulimit -a
+
+initGithubVariables
+check_if_pull_closed
+check_if_pull_noci_label
+
+init_test_options
+
+# if QA_BUILD_ARGS is unset then get the db drivers form the file system otherwise get them from the
+# default location (see build.xml). Note ${var+x} substitutes null for the parameter if var is undefined
+[ -z "${QA_BUILD_ARGS+x}" ] && QA_BUILD_ARGS="-Ddriver.url=file:///home/jenkins/dbdrivers"
+
+# Note: set QA_TARGET if you want to override the QA test ant target
+
+# for IPv6 testing use export ARQ_PROF=arqIPv6
+# if you don't want to run all the XTS tests set WSTX_MODULES to the ones you want, eg:
+# export WSTX_MODULES="WSAS,WSCF,WSTX,WS-C,WS-T,xtstest,crash-recovery-tests"
+
+[ -z "${WORKSPACE}" ] && fatal "UNSET WORKSPACE"
+
+# FOR DEBUGGING SUBSEQUENT ISSUES
+if [ -x /usr/bin/free ]; then
+ /usr/bin/free
+elif [ -x /usr/bin/vm_stat ]; then
+ /usr/bin/vm_stat
+else
+ echo "Skipping memory report: no free or vm_stat"
+fi
+
+#Make sure no JBoss processes running
+for i in `ps -eaf | grep java | grep "standalone.*.xml" | grep -v grep | cut -c10-15`; do kill -9 $i; done
+#Make sure no processes from a previous test suite run is still running
+MainClassPatterns="org.jboss.jbossts.qa com.arjuna.ats.arjuna.recovery.RecoveryManager"
+kill_qa_suite_processes $MainClassPatterns
+
+export MEM_SIZE=1024m
+[ -z ${MAVEN_OPTS+x} ] && export MAVEN_OPTS="-Xms$MEM_SIZE -Xmx$MEM_SIZE"
+export ANT_OPTS="-Xms$MEM_SIZE -Xmx$MEM_SIZE"
+export EXTRA_QA_SYSTEM_PROPERTIES="-Xms$MEM_SIZE -Xmx$MEM_SIZE -XX:ParallelGCThreads=2"
+
+# if we are building with IPv6 tell ant about it
+export ANT_OPTS="$ANT_OPTS $IPV6_OPTS"
+
+# run the job
+
+[ $NARAYANA_BUILD = 1 ] && build_narayana "$@"
+[ $AS_CLONE = 1 ] && clone_as "$@"
+[ $AS_BUILD = 1 ] && build_as "$@"
+[ $AS_TESTS = 1 ] && tests_as "$@"
+[ $LRA_AS_TESTS = 1 ] && lra_as_tests "$@"
+[ $LRA_TESTS = 1 ] && lra_tests "$@"
+[ $PERF_TESTS = 1 ] && perf_tests "$@"
+[ $CODE_COVERAGE = 1 ] && generate_code_coverage_report "$@"
+
+if [[ -z $PROFILE ]]; then
+ comment_on_pull "All tests passed - Job complete $BUILD_URL"
+elif [[ $PROFILE == "PERF" ]]; then
+ comment_on_pull "$PROFILE profile job finished $BUILD_URL"
+else
+ comment_on_pull "$PROFILE profile tests passed - Job complete $BUILD_URL"
+fi
+
+exit 0 # any failure would have resulted in fatal being called which exits with a value of 1
diff --git a/scripts/pre-release-vars.sh b/scripts/pre-release-vars.sh
new file mode 100755
index 00000000..c4df4d12
--- /dev/null
+++ b/scripts/pre-release-vars.sh
@@ -0,0 +1,2 @@
+export BRANCH=main
+export CURRENT_SNAPSHOT_VERSION=0.0.9.Final-SNAPSHOT
diff --git a/scripts/pre-release.sh b/scripts/pre-release.sh
new file mode 100755
index 00000000..ca67d9f5
--- /dev/null
+++ b/scripts/pre-release.sh
@@ -0,0 +1,102 @@
+#!/bin/bash
+
+. pre-release-vars.sh
+
+function fatal {
+ echo "Failed: $1"
+ exit 1
+}
+
+#Get the versions, stripping off any '-SNAPSHOT' suffix
+CURRENT=$(echo ${1} | awk -F '-SNAPSHOT' '{ print $1 }')
+NEXT=$(echo ${2} | awk -F '-SNAPSHOT' '{ print $1 }')
+
+if [ "$NEXT" == "" ]; then
+ echo "usage: $0 "
+ exit 1
+fi
+
+#Now add '-SNAPSHOT' to next version
+NEXT="${NEXT}-SNAPSHOT"
+
+echo "This script will:"
+echo "================="
+echo "Tag $CURRENT"
+echo "Update Narayana $BRANCH to $NEXT"
+echo ""
+echo "Are you sure you want to continue? (y/n)"
+
+read PROCEED
+
+if [ "$PROCEED" != "y" ]; then
+ echo "Aborting"
+ exit 1
+fi
+
+echo "Proceeding..."
+
+set -e
+TEMP_WORKING_DIR=~/tmp/narayana/$CURRENT/sources/
+mkdir -p $TEMP_WORKING_DIR
+cd $TEMP_WORKING_DIR || fatal
+
+for REPO in lra
+do
+ echo ""
+ echo "=== TAGGING AND UPDATING $REPO ==="
+ echo ""
+
+ if ! [[ "$REPO" =~ 'github.com' ]]; then
+ REPO_TO_CLONE="git@github.com:jbosstm/$REPO.git"
+ else
+ # for repositories in different namespace than Narayana expecting the repo is followed by name of repository to be cloned to
+ REPO_TO_CLONE="$REPO"
+ REPO=${REPO##* }
+ fi
+
+ git clone $REPO_TO_CLONE || fatal
+ cd $REPO
+ git checkout $BRANCH || fatal
+
+ if [[ "$(uname)" == "Darwin" ]] # MacOS
+ then
+ find . -name \*.java -o -name \*.xml -o -name \*.template -o -name \*.properties -o -name \*.ent -o -name \INSTALL -o -name \README -o -name pre-release-vars.sh -o -name \*.sh -o -name \*.bat -o -name \*.cxx -o -name \*.c -o -name \*.cpp -o -iname \makefile | grep -v ".svn" | grep -v ".git" | grep -v target | grep -v .idea | xargs sed -i "" "s/$CURRENT_SNAPSHOT_VERSION/$CURRENT/g" || fatal
+ else
+ find . -name \*.java -o -name \*.xml -o -name \*.template -o -name \*.properties -o -name \*.ent -o -name \INSTALL -o -name \README -o -name pre-release-vars.sh -o -name \*.sh -o -name \*.bat -o -name \*.cxx -o -name \*.c -o -name \*.cpp -o -iname \makefile | grep -v ".svn" | grep -v ".git" | grep -v target | grep -v .idea | xargs sed -i "s/$CURRENT_SNAPSHOT_VERSION/$CURRENT/g" || fatal
+ fi
+ set +e
+ git status | grep "new\|deleted"
+ if [ $? -eq 0 ]
+ then
+ "Found new files changing to tag - very strange!"
+ exit
+ fi
+ set -e
+ # when there is nothing to commit then do not commit
+ toCommit=`git diff | wc -l`
+ if [ $toCommit -ge 1 ]; then
+ git commit -am "Updated to $CURRENT" || fatal
+ fi
+ git tag $CURRENT || fatal
+
+ if [[ "$(uname)" == "Darwin" ]] # MacOS
+ then
+ find . -name \*.java -o -name \*.xml -o -name \*.template -o -name \*.properties -o -name \*.ent -o -name \INSTALL -o -name \README -o -name pre-release-vars.sh -o -name \*.sh -o -name \*.bat -o -name \*.cxx -o -name \*.c -o -name \*.cpp -o -iname \makefile | grep -v ".svn" | grep -v ".git" | grep -v target | grep -v .idea | xargs sed -i "" "s/$CURRENT/$NEXT/g" || fatal
+ else
+ find . -name \*.java -o -name \*.xml -o -name \*.template -o -name \*.properties -o -name \*.ent -o -name \INSTALL -o -name \README -o -name pre-release-vars.sh -o -name \*.sh -o -name \*.bat -o -name \*.cxx -o -name \*.c -o -name \*.cpp -o -iname \makefile | grep -v ".svn" | grep -v ".git" | grep -v target | grep -v .idea | xargs sed -i "s/$CURRENT/$NEXT/g" || fatal
+ fi
+ set +e
+ git status | grep "new\|deleted"
+ if [ $? -eq 0 ]
+ then
+ "Found new files changing to new snapshot - very strange!"
+ exit
+ fi
+ set -e
+ toCommit=`git diff | wc -l`
+ if [ $toCommit -ge 1 ]; then
+ git commit -am "Updated to $NEXT" || fatal
+ fi
+ git push origin $BRANCH --tags || fatal
+ cd ..
+done
diff --git a/scripts/rebase-jbossas-branch.sh b/scripts/rebase-jbossas-branch.sh
new file mode 100755
index 00000000..8aacf12d
--- /dev/null
+++ b/scripts/rebase-jbossas-branch.sh
@@ -0,0 +1,35 @@
+function fatal {
+ echo "Failed: $1"
+ exit 1
+}
+
+. branch-names.sh
+
+echo "Rebaseing origin/$ORIGIN_AS_BRANCH with upstream/$UPSTREAM_AS_BRANCH"
+
+GIT_URL="git@github.com:jbosstm/jboss-as.git"
+UPSTREAM_GIT_URL="https://github.com/wildfly/wildfly.git"
+TEMPORARY_REBASE_LOCATION=/tmp/rebase-jbossas-branch
+
+rm -rf $TEMPORARY_REBASE_LOCATION || fatal
+mkdir $TEMPORARY_REBASE_LOCATION || fatal
+cd $TEMPORARY_REBASE_LOCATION || fatal
+
+git clone $GIT_URL || fatal
+cd jboss-as
+git fetch
+git checkout $ORIGIN_AS_BRANCH || fatal
+
+git remote add upstream $UPSTREAM_GIT_URL
+git pull --rebase --ff-only upstream $UPSTREAM_AS_BRANCH
+
+if [ $? != 0 ]; then
+ echo "Merge conflict needs manual intervention. Please go to '$TEMPORARY_REBASE_LOCATION/jboss-as' and resolve, then run:"
+ echo ""
+ echo " git push origin $ORIGIN_AS_BRANCH"
+ echo " rm -rf $TEMPORARY_REBASE_LOCATION"
+ exit -1
+fi
+
+git push origin $ORIGIN_AS_BRANCH -f
+rm -rf $TEMPORARY_REBASE_LOCATION
diff --git a/service-base/pom.xml b/service-base/pom.xml
index 2a717823..802cf35e 100644
--- a/service-base/pom.xml
+++ b/service-base/pom.xml
@@ -6,9 +6,9 @@
4.0.0
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-parent
- 7.1.1.Final-SNAPSHOT
+ 0.0.9.Final-SNAPSHOT
lra-service-base
@@ -34,6 +34,10 @@
org.jboss.logging
jboss-logging
+
+ junit
+ junit
+
diff --git a/test/arquillian-extension/pom.xml b/test/arquillian-extension/pom.xml
index 9042fd73..0ccee533 100644
--- a/test/arquillian-extension/pom.xml
+++ b/test/arquillian-extension/pom.xml
@@ -6,9 +6,9 @@
4.0.0
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-test
- 7.1.1.Final-SNAPSHOT
+ 0.0.9.Final-SNAPSHOT
lra-test-arquillian-extension
@@ -28,15 +28,15 @@
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
narayana-lra
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-coordinator-jar
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-client
diff --git a/test/arquillian-extension/src/main/java/io/narayana/lra/arquillian/deployment/WildflyLRACoordinatorDeployment.java b/test/arquillian-extension/src/main/java/io/narayana/lra/arquillian/deployment/WildflyLRACoordinatorDeployment.java
index 7077e92a..6651bf2f 100644
--- a/test/arquillian-extension/src/main/java/io/narayana/lra/arquillian/deployment/WildflyLRACoordinatorDeployment.java
+++ b/test/arquillian-extension/src/main/java/io/narayana/lra/arquillian/deployment/WildflyLRACoordinatorDeployment.java
@@ -54,11 +54,11 @@ public Archive create(String deploymentName) {
.workOffline()
.withMavenCentralRepo(false)
.withClassPathResolution(true)
- .resolve("org.jboss.narayana.rts:lra-coordinator-jar:" + projectVersion,
- "org.jboss.narayana.rts:lra-proxy-api:" + projectVersion,
- "org.jboss.narayana.rts:narayana-lra:" + projectVersion,
- "org.jboss.narayana.rts:lra-client:" + projectVersion,
- "org.jboss.narayana.rts:lra-service-base:" + projectVersion)
+ .resolve("org.jboss.narayana.lra:lra-coordinator-jar:" + projectVersion,
+ "org.jboss.narayana.lra:lra-proxy-api:" + projectVersion,
+ "org.jboss.narayana.lra:narayana-lra:" + projectVersion,
+ "org.jboss.narayana.lra:lra-client:" + projectVersion,
+ "org.jboss.narayana.lra:lra-service-base:" + projectVersion)
.withoutTransitivity().asFile())
// Adds a manifest to activate jts and logging submodules of Wildfly
.addAsManifestResource(new StringAsset(ManifestMF),"MANIFEST.MF")
diff --git a/test/basic/pom.xml b/test/basic/pom.xml
index 901eb34d..a7934bb4 100644
--- a/test/basic/pom.xml
+++ b/test/basic/pom.xml
@@ -6,9 +6,9 @@
4.0.0
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-test
- 7.1.1.Final-SNAPSHOT
+ 0.0.9.Final-SNAPSHOT
lra-test-basic
@@ -35,7 +35,7 @@
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
narayana-lra
@@ -43,7 +43,7 @@
jakarta.enterprise.cdi-api
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-test-arquillian-extension
test
diff --git a/test/crash/pom.xml b/test/crash/pom.xml
index d4063df0..5f9eaa2a 100644
--- a/test/crash/pom.xml
+++ b/test/crash/pom.xml
@@ -6,9 +6,9 @@
4.0.0
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-test
- 7.1.1.Final-SNAPSHOT
+ 0.0.9.Final-SNAPSHOT
../pom.xml
@@ -30,7 +30,7 @@
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-test-arquillian-extension
test
diff --git a/test/crash/src/test/java/io/narayana/lra/arquillian/Deployer.java b/test/crash/src/test/java/io/narayana/lra/arquillian/Deployer.java
index 136e9402..344c1d8f 100644
--- a/test/crash/src/test/java/io/narayana/lra/arquillian/Deployer.java
+++ b/test/crash/src/test/java/io/narayana/lra/arquillian/Deployer.java
@@ -34,10 +34,10 @@ public static WebArchive createDeployment(String appName, Class>... classes) {
.workOffline()
.withMavenCentralRepo(false)
.withClassPathResolution(true)
- .resolve("org.jboss.narayana.rts:lra-service-base:" + projectVersion,
- "org.jboss.narayana.rts:lra-proxy-api:" + projectVersion,
- "org.jboss.narayana.rts:lra-client:" + projectVersion,
- "org.jboss.narayana.rts:narayana-lra:" + projectVersion)
+ .resolve("org.jboss.narayana.lra:lra-service-base:" + projectVersion,
+ "org.jboss.narayana.lra:lra-proxy-api:" + projectVersion,
+ "org.jboss.narayana.lra:lra-client:" + projectVersion,
+ "org.jboss.narayana.lra:narayana-lra:" + projectVersion)
.withoutTransitivity().asFile())
// Adds a manifest to activate jts and logging submodules of Wildfly
.addAsManifestResource(
diff --git a/test/pom.xml b/test/pom.xml
index 351ce868..302e61cb 100644
--- a/test/pom.xml
+++ b/test/pom.xml
@@ -7,9 +7,9 @@
4.0.0
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-parent
- 7.1.1.Final-SNAPSHOT
+ 0.0.9.Final-SNAPSHOT
../pom.xml
@@ -41,6 +41,7 @@
is deployed at the different JVM; these properties define where the test JVM application is started -->
localhost
8180
+ ${version.org.jboss.resteasy}
@@ -49,12 +50,12 @@
resteasy-client
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-client
test
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
narayana-lra
test
@@ -129,7 +130,7 @@
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-coordinator-war
war
@@ -228,7 +229,7 @@
${server.jvm.args} ${server.jvm.object.store.arg}
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-coordinator-war
${lra.coordinator.war.name}
true
diff --git a/test/tck/pom.xml b/test/tck/pom.xml
index 27b7e757..c9ba88f4 100644
--- a/test/tck/pom.xml
+++ b/test/tck/pom.xml
@@ -6,9 +6,9 @@
4.0.0
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-test
- 7.1.1.Final-SNAPSHOT
+ 0.0.9.Final-SNAPSHOT
../pom.xml
@@ -28,12 +28,12 @@
provided
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-proxy-api
test
- org.jboss.narayana.rts
+ org.jboss.narayana.lra
lra-test-arquillian-extension