You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/site/content/managing-domains/accessing-the-domain/external-clients.md
+79-10Lines changed: 79 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,12 +127,8 @@ is hosted outside of the Kubernetes cluster, then:
127
127
This can significantly speedup connection creation for EJB and JMS clients.
128
128
See [Configuring WebLogic Server affinity load balancing algorithms](#configuring-weblogic-server-affinity-load-balancing-algorithms).
129
129
130
-
-__JTA NOTE__: The operator does not directly support external WebLogic JTA access
131
-
to a Kubernetes hosted WebLogic cluster. This is because external JTA access
132
-
requires each server in a cluster to be individually addressable,
133
-
but this conflicts with the current operator requirement that
134
-
a network channel in a cluster have the same port across all servers in the cluster.
135
-
If this is a requirement, then contact the WebLogic Kubernetes Operator team for potential solutions.
130
+
- You may need to use [RMI forwarding](#cross-domain-transactions) to
131
+
support JTA transactions that involve multiple WebLogic Server domains.
136
132
137
133
If a WebLogic EJB or JMS resource is hosted outside of
138
134
a Kubernetes cluster, and the EJB or JMS applications
@@ -150,10 +146,8 @@ that call the resource are located within the cluster, then:
150
146
This can significantly speedup tunneling connection creation for EJB and JMS clients.
151
147
See [Configuring WebLogic Server affinity load balancing algorithms](#configuring-weblogic-server-affinity-load-balancing-algorithms).
152
148
153
-
-__JTA NOTE__: WebLogic does not directly support JTA access to a cluster that is exposed
154
-
using a single port. This is because external JTA requires each server in a cluster
155
-
to be individually addressable.
156
-
If this is a requirement, then contact the WebLogic Kubernetes Operator team for potential solutions.
149
+
- You may need to use [RMI forwarding](#cross-domain-transactions) to
150
+
support JTA transactions that involve multiple WebLogic Server domains.
157
151
158
152
{{% notice note %}}
159
153
All DNS addresses must be 'DNS-1123' compliant;
@@ -427,6 +421,81 @@ To enable an 'unknown host' source WebLogic Server to initiate EJB, JMS, or JTA
427
421
* For operator hosted WebLogic Server instances, you can set this property by including `-Dweblogic.rjvm.allowUnknownHost=true` in the `JAVA_OPTIONS` [Domain environment variable]({{< relref "/managing-domains/domain-resource#jvm-memory-and-java-option-environment-variables" >}}) defined in the domain resource's `spec.serverPod.env` attribute.
428
422
* Also apply patch 30656708 on each target WebLogic Server instance for versions 12.2.1.4 (PS4) or earlier.
429
423
424
+
### Cross-domain transactions
425
+
426
+
JTA transactions that span WebLogic Server domains are referred to as cross-domain transactions. The
427
+
WebLogic Server Transaction Manager (TM) requires direct server-to-server communications with all
428
+
other global transaction server participants. For a Kubernetes hosted WebLogic cluster, this
429
+
requires each server in the cluster to be individually addressable. This conflicts
430
+
with the current operator requirement that a network channel in a cluster have the same port across
431
+
all servers in the cluster, and the fact that we use cluster service to load balance communication
432
+
in the WebLogic Server cluster.
433
+
434
+
#### RMI forwarding
435
+
436
+
RMI forwarding makes cross-domain transactions possible without requiring each server in a cluster
437
+
to be individually addressable.
438
+
439
+
It requires the use of a proxy, such as a load balancer or an [Ingress]({{< relref "/managing-domains/accessing-the-domain/ingress/_index.md" >}}),
440
+
that is configured to route messages to servers in the target WebLogic Server domain.
441
+
442
+
When a T3 message, such as transaction coordination RMI calls issued by the WebLogic Server TM,
443
+
is sent from a source WebLogic Server to a target WebLogic Server in a different WebLogic Server domain:
444
+
1. The source WebLogic Server chooses the URL of a proxy based on the destination
445
+
address of the message, and sends the message to that URL.
446
+
1. The proxy then routes the message to one of the WebLogic Servers in the
447
+
target WebLogic Server domain according to its routing rules. Note that the message may or may not
448
+
be routed to the target WebLogic Server.
449
+
1. If the message is routed to a WebLogic Server other than the target WebLogic Server,
450
+
that WebLogic Server will forward the message to the intended recipient
451
+
within the same WebLogic Server domain.
452
+
453
+
#### When is it necessary to configure RMI forwarding?
454
+
455
+
RMI forwarding may be needed when transaction server participants are not able to establish
456
+
connection directly with one another.
457
+
458
+
For example, if a cross-domain transaction communication has failed, and messages such as the
459
+
following can be found in the WebLogic server log files:
460
+
461
+
`<BEA-111015> <The commit operation for transaction BEA1-0000993203DB6CDB7DE9 timed out after 30 seconds.>`
462
+
463
+
With additional JTA debugging turned on using the Java system property `-Dweblogic.debug.DebugJTA2PC=true`,
464
+
messages, such as the following, confirm that the failed transaction is caused by transaction
465
+
participants not being able to reach the transaction coordinator:
466
+
467
+
`...<startPrepare FAILED javax.transaction.SystemException: Could not obtain coordinator at managed-server1+domain1-managed-server1:8001+domain1+t3+...`
468
+
469
+
#### How to configure RMI forwarding
470
+
471
+
Configure a proxy for each WebLogic Server domain that is a participant in global transactions but
472
+
is not reachable by all other global transaction participants, because the listen addresses of
473
+
the WebLogic Server instances in the domain cannot be resolved by the DNS from other participants.
474
+
For example, if servers in domain1 cannot be reached from servers in domain2, configure a proxy
475
+
for domain1 such that messages sent from servers in domain2 can be routed to servers in domain1
476
+
through the proxy.
477
+
478
+
In each source WebLogic Server domain, specify the URL for the proxy configured for each target
479
+
WebLogic Server domain:
480
+
481
+
- Set the Java system property as `weblogic.rjvm.domain.proxy.<prefix>` where `<prefix>` is the
482
+
domain UID of the target WebLogic Server domain.
483
+
Multiple Java system properties with different values of `<prefix>` can be specified.
484
+
- For WebLogic Server domains running in Kubernetes managed by the operator, you can set this property by including the system property in the `JAVA_OPTIONS`
485
+
[Domain environment variable]({{< relref "/managing-domains/domain-resource#jvm-memory-and-java-option-environment-variables" >}}) defined in the domain resource's `spec.serverPod.env` attribute.
486
+
487
+
For example, if the URL of the proxy for domain1 is `t3://proxy-host:31234`, specify
488
+
Java system property `-Dweblogic.rjvm.domain.proxy.domain1=t3://proxy-host:31234`
489
+
in WebLogic Server domain2.
490
+
A message originating from WebLogic Server instances in domain2 that are addressed to the host name that starts
491
+
with domain1, such as `t3://domain1-managed-server1:8001`, will be sent to the proxy at
492
+
`t3://proxy-host:31234`. The proxy then routes the message to a WebLogic Server instance in domain2, and
493
+
RMI forwarding will ensure that the message will reach WebLogic Server managed-server1 in domain1.
494
+
495
+
Patch 32408938 is required in each WebLogic Server instance that participates in cross-domain transactions, or that is the routing
496
+
destination of a proxy. The patch is available for WebLogic versions 12.2.1.3.0 (PS3),
497
+
12.2.1.4.0 (PS4), and 14.1.1.0.0, and is already included in the PSUs for these releases since July 2022.
498
+
430
499
### Configuring WebLogic Server affinity load balancing algorithms
431
500
432
501
When providing external clients access to EJB and JMS resources using load balancer tunneling, we recommend that you configure a server affinity load balancing algorithm for the cluster in which the resources are targeted. Using a server affinity based algorithm reduces the amount of time it takes for EJB and JMS standalone or server hosted clients to establish a connection through a tunneling port. It does this by ensuring that the clients prefer communicating with a target server instance which already has an established connection to the client, where this server instance is implicitly picked when such clients create their JNDI context. See [Load Balancing for EJBs and RMI Objects](https://docs.oracle.com/en/middleware/fusion-middleware/weblogic-server/12.2.1.4/clust/load_balancing.html#GUID-2470EEE9-F6F9-44EF-BA54-671728E93DE6) in _Load Balancing in a Cluster_.
0 commit comments