-
Notifications
You must be signed in to change notification settings - Fork 566
Weblogic Thin T3 client
Javax based Helidon 2.x works well with wlthint3client.jar
, you can use it directly or with Helidon messaging JMS connector:
https://medium.com/helidon/helidon-messaging-with-weblogic-jms-7e6ecccdd82d
Since Helidon 3.x and higher is jakartified(dropping javax.*
packages and fully-embracing jakarta.*
packages),
no libraries using older javax based HK2 injection engine work on the same classpath.
This is the case of Weblogic wlthint3client.jar
client library,
most commonly used for connecting to JMS resources hosted by Weblogic server.
Startup error when javax based wlthint3client.jar
is on classpath:
Caused by: java.lang.NoSuchMethodException: The class GlobalServiceLocator has no constructor marked @Inject and no zero argument constructor
at org.jvnet.hk2.internal.Utilities.findProducerConstructor(Utilities.java:1326)
...
java.lang.IllegalStateException: Could not find an implementation of ClassAnalyzer with name default
at org.jvnet.hk2.internal.ServiceLocatorImpl.getAnalyzer(ServiceLocatorImpl.java:2468)
While with Helidon 2.x it was possible to use messaging JMS connector with wlthint3client.jar
.
With Helidon 3.x and newer specialized Weblogic messaging connector is needed:
<dependency>
<groupId>io.helidon.messaging.wls-jms</groupId>
<artifactId>helidon-messaging-wls-jms</artifactId>
</dependency>
Weblogic connector isolates the wlthint3client.jar
in specialized classloader, keeping it from crashing Helidon's HK2.
mp:
messaging:
connector:
helidon-weblogic-jms:
# JMS factory configured in Weblogic
jms-factory: jms/TestConnectionFactory
# Path to the WLS Thin T3 client jar
thin-jar: /path/to/wlthint3client.jar
url: t3://localhost:7001
principal: jms_user
credentials: Welcome1
incoming:
from-wls:
connector: helidon-weblogic-jms
# WebLogic CDI Syntax(CDI stands for Create Destination Identifier)
destination: ./TestJMSModule!TestQueue
outgoing:
to-wls:
connector: helidon-weblogic-jms
destination: ./TestJMSModule!TestQueue
wlthint3client.jar
on Helidon classpath, client library location needs to be
configured and loaded by Helidon messaging connector.
--add-opens=java.base/java.io=ALL-UNNAMED
to allow
wlthint3client use reflection.
When connecting to Weblogic cluster with Helidon JMS or Weblogic messaging connector,
destination
property needs to be configured with Weblogic CDI syntax, NOT with JNDI.
This is because Weblogic JMS implementation, unlike other JMS clients,
expects CDI destination locators instead of JNDI on the JMS session methods
(Session.createTopic(String name)
, Session.createQueue(String name)
).
WebLogic CDI(Create Destination Identifier, don't confuse with dependency injection),
is Weblogic's custom syntax for locating Queues and Topics over JMS API methods Session.createTopic(String name)
and Session.createQueue(String name)
with actual MBean names(Name in WLS console).
When accessing non-distributed queue/topic you need to specify:
- JMS server name
- JMS module name
- Queue/Topic name
With following syntax:
jms-server-name/jms-module-name!destination-name
When you know that queue or topic you want to access is on the same server as JMS Connection Factory you are using,
server affinity is possible with ./
instead of full server name.
./jms-module-name!destination-name
Distributed queues/topics are logical destinations acting as load balancers between physical queues/topics usually residing on separated JMS servers/cluster nodes(UDD members). When you need to access UDD you can use following syntax on any cluster server, admin or managed one:
jms-module-name!udd-name
./
or /
To directly access an UDD member queue/topic, you need to use syntax for non-distributed destination:
jms-server-name/jms-module-name!member-name
Example:
TestJmsServer-1/TestJMSModule!TestJmsServer-1@udd_queue