Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft of the wls-helidon integration for 2.x #6946

Merged

Conversation

Geetha-Savithriamma
Copy link

@Geetha-Savithriamma Geetha-Savithriamma commented Jun 5, 2023

Hello team,

This is the first draft of the wls-helidon integration doc for 2.x. It includes the following integrations:

  • REST
  • Web Services
  • JMS
  • Single Sign-on
  • MicroTx

We are yet to fix the comments for 3.x. The same applies to 2.x as well.
Request you to please review the MicroTx content (the last topic) only for now.

Warm regards,
Geetha.

@Geetha-Savithriamma Geetha-Savithriamma self-assigned this Jun 5, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 5, 2023

*Dependencies for the WLS thin client JAR file*

Download the Jakarta thin client JAR (`wlthint3client.jakarta`) file from https://edelivery.oracle.com/osdc/faces/Home.jspx[Oracle Software Delivery Cloud], and add it as part of the Maven dependencies:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This client is not jakarta it is called wlthint3client and can not be downloaded from edelivery. The wlthint3client is generated when WebLogic Server is installed and It is located in the WL_HOME\server\lib directory of the WebLogic Server installation.

Copy link

@naradta naradta Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Geetha-Savithriamma
Helidon2 is supported only with the wlthint3client jar. Jakarta thin client JAR is only for Helidon3.

Hi @mriccell
We can use the wlthint3client jar from the path WL_HOME\server\lib. But as per the latest updates from the WebLogic Development team, the multi-version wlthint3client jar also will be delivered separately along with Jakarta thin client jar. Could you please clarify this?

[source,xml]
----
<dependency>
<groupId>wlthint3client.jakarta</groupId>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

his client is not jakarta it is called wlthint3client

Copy link

@naradta naradta Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Geetha-Savithriamma
In Helidon2, we need to use the wlthint3client dependency. Also, this should be added to the local Maven repo
Maven Dependency:

<dependency>
    <groupId>wlthint3client</groupId>
    <artifactId>wlthint3client</artifactId>
    <version>1.0</version>
</dependency>

Maven Install Command:
mvn install:install-file -Dfile=<JAR_PATH>/wlthint3client.jar -DgroupId=wlthint3client -DartifactId=wlthint3client -Dversion=1.0


=== Maven Coordinates [[Web-Services-Integration-Maven-Coordinates]]

Add the `com.oracle.webservices.wls.jaxws-wlswss-client.jar` client file downloaded from https://edelivery.oracle.com/osdc/faces/Home.jspx[Oracle Software Delivery Cloud], as part of the Maven dependencies:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this client should not be downloaded from edelivery. The com.oracle.webservices.wls.jaxws-wlswss-client.jar is generated when WebLogic Server is installed and It is located in the WL_HOME\server\lib directory of the WebLogic Server installation.

----
<dependency>
<groupId>wlthint3client.jakarta</groupId>
<artifactId>wlthint3client-jakarta</artifactId>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this client is not jakarta it is called wlthint3client


==== Building and Deploying the Helidon Participant Application

Download the image for MicroTx Free from https://container-registry.oracle.com/[Oracle Container Registry] and add the 'TmmLib' library to the local Maven repository. This library is available in the '<OTMM_BINARIES_EXTRACTED_PATH>/lib/java/' location.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Download -> Obtain or Pull the image

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mriccell
As per my understanding, we need to download the complete Microtx binaries which include otmm image along with otmm library & samples. Could you please clarify this?

}
----

For more information about this integration, see https://docs-uat.us.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/wlshe/integrating-oracle-weblogic-server-jms-helidon.html#GUID-5E28DBC5-6CB3-49E1-B1A7-BF30191AE8AB[Integrating WebLogic JMS with Helidon 2.x]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Geetha-Savithriamma
Request you to provide reference to Helidon2 JMS Connector along with WLS Integ doc.

Helidon2 JMS Connector:
https://helidon.io/docs/v2/#/mp/reactivemessaging/05_jms

@ljamen ljamen added docs 2.x Issues for 2.x version branch labels Jun 7, 2023

==== Building and Deploying the Helidon Teller Application

Download the image for MicroTx Free from https://container-registry.oracle.com/[Oracle Container Registry] and add the `TmmLib` library to the local Maven repository. This library is available in the `<OTMM_BINARIES_EXTRACTED_PATH>/lib/java/` location.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instruction is to download the docker image for MicroTx, right? If that's the case, how would the user access <OTMM_BINARIES_EXTRACTED_PATH>/lib/java/ location? Are they going to this via a docker container? Should they rather download the distribution in https://www.oracle.com/database/transaction-manager-for-microservices/ and extract that in their local path? BTW, I found this link from a comment by Monica on this same line/topic in review.us.oracle.com.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there a mention of TmmLib library and OTMM library below? Are they the same? If so, would it be better to use the same terminology?


[source,shell]
----
mvn install:install-file -Dfile=<OTMM_BINARIES_EXTRACTED_PATH>/lib/java/TmmLib-22.3.2.jar -DpomFile=<OTMM_BINARIES_EXTRACTED_PATH>/lib/java/TmmLib-weblogic-22.3.2.pom
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this by downloading the zip distribution as I mentioned above and it seems that the pomfile value is wrong. What worked for me is -DPomFile=<OTMM_BINARIES_EXTRACTED_PATH>/lib/java/weblogic/TmmLib-weblogic-22.3.2.pom. Note that the pom is inside of webLogic directory under java, and not in the java directory. Can you please check this?

oracle.tmm.PropagateTraceHeaders = false
----

Create the Docker image for the Helidon Teller Application, upload the image to the Docker registry, and then deploy the application in the Kubernetes cluster.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do they create the Docker image? Shouldn't they run the docker build command for this on a DockerFile? I looked at the readme.md in <OTMM_BINARIES_EXTRACTED_PATH>/samples/xa/java/weblogic/teller and it has instruction on how to run the docker build to create the image. The directory also has the Dockerfile that would allow to build the image, so should it not be given as an example instruction? Like:

  1. Go to the teller directory:
    cd <OTMM_BINARIES_EXTRACTED_PATH>/samples/xa/java/weblogic/teller
    
  2. Run the docker build command to create the image (fill the image_name and tag with the desired values):
    docker build --network host -t <image_name>:<tag> .
    


==== Building and Deploying the Helidon Participant Application

Obtain the image for MicroTx Free from https://container-registry.oracle.com/[Oracle Container Registry] and add the 'TmmLib' library to the local Maven repository. This library is available in the '<OTMM_BINARIES_EXTRACTED_PATH>/lib/java/' location.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above, i.e: The instruction is to download the docker image for MicroTx, right? If that's the case, how would the user access <OTMM_BINARIES_EXTRACTED_PATH>/lib/java/ location? Are they going to this via a docker container? Should they rather download the distribution in https://www.oracle.com/database/transaction-manager-for-microservices/ and extract that in their local path? BTW, I found this link from a comment by Monica on this same line/topic in review.us.oracle.com.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there a mention of TmmLib library and OTMM library below? Are they the same? If so, would it be better to use the same terminology?

oracle.tmm.xa.<rmid> = HELIDON-TX-RM-ID-FOR-MICROTX-TESTS
----

Create the Docker image for the Helidon Participant Application, upload the image to the Docker registry, and then deploy the application in the Kubernetes cluster.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above, ie: How do they create the Docker image? Shouldn't they run the docker build command for this on a DockerFile? I looked at the readme.md in <OTMM_BINARIES_EXTRACTED_PATH>/samples/xa/java/weblogic/helidon-app and it has instruction on how to run the docker build to create the image. The directory also has the Dockerfile that would allow to build the image, so should it not be given as an example instruction? Like:

  1. Go to the teller directory:
    cd <OTMM_BINARIES_EXTRACTED_PATH>/samples/xa/java/weblogic/helidon-app
    
  2. Run the docker build command to create the image (fill the image_name and tag with the desired values):
    docker build --network host -t <image_name>:<tag> .
    

docs/mp/integration/wls.adoc Show resolved Hide resolved
* The JMS integration allows Helidon microservices to publish and consume messages from WebLogic JMS Server.
* The WebLogic Web Services integration allows Helidon microservices to interact with WebLogic Server applications through SOAP (Simple Object Access Protocol) Web Service calls from Helidon to WebLogic Server.
* The WebLogic Server and Helidon integration allows communication between a WebLogic cluster-hosted application and a Helidon microservice application by implementing Single Sign-on (SSO) authentication using Oracle Identity Cloud Service (IDCS).
* XA Transactions Integration with {micro-tx-link} allows participating in XA transactions to both Helidon and WebLogic Server applications.
Copy link
Member

@klustria klustria Jul 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe worded like?

XA Transactions Integration with {micro-tx-link} allows Helidon and WebLogic Server applications to participate in in a two-phase commit.

* The REST integration allows WebLogic Server applications and Helidon microservices to communicate through RESTful Web Service invocations.
* The JMS integration allows Helidon microservices to publish and consume messages from WebLogic JMS Server.
* The WebLogic Web Services integration allows Helidon microservices to interact with WebLogic Server applications through SOAP (Simple Object Access Protocol) Web Service calls from Helidon to WebLogic Server.
* The WebLogic Server and Helidon integration allows communication between a WebLogic cluster-hosted application and a Helidon microservice application by implementing Single Sign-on (SSO) authentication using Oracle Identity Cloud Service (IDCS).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe worded like?

The SSO integration allows secure access between a WebLogic cluster-hosted application and a Helidon microservice application by implementing Single Sign-on (SSO) authentication using Oracle Identity Cloud Service (IDCS).

docs/mp/integration/wls.adoc Show resolved Hide resolved
MicroTX ensures consistency of XA transactions using the following distributed applications as an example.
=== Overview [[XA-Integration-Overview]]
XA (eXtended Architecture) is a specification for distributed transactions leveraging 2PC (two-phase) commit approach.
Helidon and Oracle WebLogic Server applications can participate in same XA transactions thanks to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comma between transactions and thanks

Helidon and Oracle WebLogic Server applications can participate in same XA transactions, thanks to

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

ljnelson
ljnelson previously approved these changes Jul 8, 2023
Copy link
Member

@ljnelson ljnelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly minor comments.

* The JMS integration allows Helidon microservices to publish and consume messages from WebLogic JMS Server.
* The WebLogic Web Services integration allows Helidon microservices to interact with WebLogic Server applications through SOAP (Simple Object Access Protocol) Web Service calls from Helidon to WebLogic Server.
* The WebLogic Server and Helidon integration allows communication between a WebLogic cluster-hosted application and a Helidon microservice application by implementing Single Sign-on (SSO) authentication using Oracle Identity Cloud Service (IDCS).
* XA Transactions Integration with {micro-tx-link} allows participating in XA transactions to both Helidon and WebLogic Server applications.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"XA Transactions Integration with {micro-tx-link} allows XA transactions to span Helidon and WebLogic Server applications."

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to "XA Transactions integration with {micro-tx-link} allows Helidon and WebLogic Server applications to participate in a two-phase commit."


The following integrations are explained in this document:

* The REST integration allows WebLogic Server applications and Helidon microservices to communicate through RESTful Web Service invocations.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Later you call this "REST services integration"; not sure which is correct.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected.

docs/mp/integration/wls.adoc Show resolved Hide resolved
docs/mp/integration/wls.adoc Show resolved Hide resolved
docs/mp/integration/wls.adoc Show resolved Hide resolved


=== Overview [[XA-Integration-Overview]]
XA (eXtended Architecture) is a specification for distributed transactions leveraging 2PC (two-phase) commit approach.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leveraging 2PC (two-phase) commit approach


=== Overview [[XA-Integration-Overview]]
XA (eXtended Architecture) is a specification for distributed transactions leveraging 2PC (two-phase) commit approach.
Helidon and Oracle WebLogic Server applications can participate in same XA transactions thanks to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can participate in a single XA transaction

<2> Refers to the Helidon Teller Application call-back URL along with context path
<3> Resource Manager(RM) Unique Id. Make sure to replace the id value with the RM used in the application

Each property can be overridden by its upper case snake case environment variable variant, example:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variant. For example:

password: <db-password>
----

XA capable datasource needs to be registered with MicroTx.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The XA

}
}
----
<1> Datasource's initialization with MicroTx after CDI container start.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this. Do you mean something like "This registers the XA data source with MicroTx at CDI container startup time."?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Copy link
Contributor

@ljamen ljamen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All comments have been addressed. Additional doc bugs may be filed to address issues with file name changes. TBD.

- <<MicroTx-Integration-References, References>>


=== Overview [[MicroTx-Integration-Overview]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed by PR #6946

----
mvn clean package -DskipTests=true
----
For information about developing the REST Service using JAX-RS and Helidon API, see https://docs-uat.us.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/wlshe/integrating-oracle-weblogic-server-rest-services-helidon.html#GUID-AB8F2DC5-840B-40E7-89B4-7FDAD8035C88[Integrating WebLogic REST Services with Helidon 2.x].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to change link for Prod

}
----

Use the IDCS *Client ID* and *Client Secret* of the WebLogic cluster application to obtain the access token to access the WebLogic cluster application SSO points.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revise based on Daniel's updates in Oracle Review/Git.

== Contents

- <<Overview, Overview>>
- <<REST Services Integration, REST Services Integration>>
- <<JMS Integration, JMS Integration>>
- <<Web Services Integration, Web Services Integration>>
- <<Single Sign-On on OCI Integration, Single Sign-On on OCI Integration>>
- <<MicroTx Integration, MicroTx Integration>>
- <<XA Transactions Integration, XA-Transactions-Integration>>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we not referring to this as MicroTx?

@ljamen ljamen merged commit a5fefae into helidon-io:helidon-2.x Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issues for 2.x version branch docs OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants