Skip to content

Conversation

@anpanigr
Copy link
Member

@anpanigr anpanigr commented May 5, 2021

This test verifies cross domain MessageDrivenBean communication (Istio/Non-Istio)
A transacted MDB on Domain D1 listen on a replicated Distributed Topic on Domain D2.
The MDB is deployed to cluster on domain D1 with MessagesDistributionMode set to One-Copy-Per-Server.
The OnMessage() routine sends a message to local queue on receiving the message.
An application servlet is deployed to Administration Server on D1 which send/receive message from a JMS destination based on a given URL.
Usecase
(a) app servlet send message to Distributed Topic on D2
(b) mdb puts a message into local Queue for each received message
(c) make sure local Queue gets 2X times messages sent to Distributed Topic
(d) make sure the each MDB instance receives equal number of messsages

Since the MessagesDistributionMode is set to One-Copy-Per-Server and targeted to a cluster of two servers, onMessage() will be triggered for or both instance of MDB for a message sent to Distributed Topic

In Progress
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/4946
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/4962/
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/4965/

@anpanigr anpanigr changed the title Cross Domain RMI communcation with Message Driven Bean Cross Domain RMI communcation with Message Driven Bean (istio/non-istio) May 7, 2021
@anpanigr anpanigr requested a review from tbarnes-us May 7, 2021 18:36
@tbarnes-us
Copy link

@@prop:DOMAIN_NAME@@-managed-server${id}.@@prop:NAMESPACE@@ -->

@tbarnes-us
Copy link

FYI, no "properties" needed assuming domain uid and namespace are 'DNS name' compliant (no "_", no caps):

@@PROP:DOMAIN_NAME@@-managed-server${id}.@@PROP:NAMESPACE@@
--->
@@ENV:DOMAIN_UID@@-managed-server${id}.@@ENV:NAMESPACE@@


// Now that we got the namespaces for both the domains, we need to update the model properties
// file with the namespaces. For cross domain transaction to work, we need to have the externalDNSName
// file with the namespaces. For a cross-domain transaction to work, we need to have the externalDNSName

Choose a reason for hiding this comment

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

For cross domain transaction is correct - do not need a

Copy link
Member Author

Choose a reason for hiding this comment

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

When I run grammerly apps on the code, it suggested cross domain -> cross-domain


assertDoesNotThrow(() -> copyFolder(
mdbSrcDir.toString(), mdbDestDir.toString()),
"Could not mdbtopic application directory");

Choose a reason for hiding this comment

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

Could not copy mdbtopic .....

Copy link
Member Author

Choose a reason for hiding this comment

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

done

String curlRequest = String.format("curl -v --show-error --noproxy '*' "
+ "http://%s:%s/cdttxservlet/cdttxservlet?namespaces=%s,%s",
K8S_NODEPORT_HOST, domain1AdminServiceNodePort, domain1Namespace, domain2Namespace);
K8S_NODEPORT_HOST, admin1ServiceNodePort, domain1Namespace, domain2Namespace);

Choose a reason for hiding this comment

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

I like the original name - domain1AdminServiceNodePort better since it tells me immediately that it is the admin server belonging to domain1

Copy link
Member Author

Choose a reason for hiding this comment

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

done

}

/*
* This test verifies a cross-domain MessageDrivenBean communication

Choose a reason for hiding this comment

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

Dont think you need "a"

Copy link
Member Author

Choose a reason for hiding this comment

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

done

package application;

import java.io.IOException;
import java.io.*;

Choose a reason for hiding this comment

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

Could you import specific classes the servlet needs?

Copy link
Member Author

Choose a reason for hiding this comment

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

done


package application;

import java.util.*;

Choose a reason for hiding this comment

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

import only classes needed by this servlet?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@bhavaniravichandran bhavaniravichandran left a comment

Choose a reason for hiding this comment

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

LGTM

@rjeberhard rjeberhard merged commit 3a737ef into main May 12, 2021
@robertpatrick robertpatrick deleted the xdomain-rmi branch January 31, 2022 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants