Integrate Oracle WebLogic JMS
In this procedure, you will learn how to integrate Kaazing Gateway and Oracle WebLogic JMS, an enterprise-class messaging system that is tightly integrated into the WebLogic Server platform.
To Integrate Oracle WebLogic JMS
- Download and install Oracle WebLogic Server following the instructions on the Oracle website. You might also want to consult the Oracle documentation, Configuring and Managing JMS for Oracle WebLogic Server.
-
Determine the type of WebLogic stand-alone clients you want the Gateway to support:
For information about WebLogic stand-alone clients for Oracle WebLogic Server, see the Oracle documentation.
-
Copy the following JAR files to the library directory for the Gateway,
GATEWAY_HOME/lib/ext
:- WebLogic Thin T3 Client:
wlthint3client.jar
- WebLogic Thin JMS Client:
wlclient.jar
,wljmsclient.jar
- WebLogic Full Client:
wlfullclient.jar
- WebLogic Thin T3 Client:
- Open the file
GATEWAY_HOME/conf/gateway-config.xml
in a text editor and locate thejms
service element (search for “jms”). -
Update the jms service element properties section as shown in the following example:
<service> <accept>ws://localhost:8001/jmsWeblogic</accept> <type>jms</type> <properties> <connection.factory.name>weblogic.jms.ConnectionFactory</connection.factory.name> <!-- optional username & password locations --> <!-- <Context.SECURITY_PRINCIPAL></Context.SECURITY_PRINCIPAL> --> <!-- <Context.SECURITY_CREDENTIALS></Context.SECURITY_CREDENTIALS> --> <context.lookup.topic.format>%s</context.lookup.topic.format> <context.lookup.queue.format>%s</context.lookup.queue.format> <env.java.naming.factory.initial> weblogic.jndi.WLInitialContextFactory </env.java.naming.factory.initial> <env.java.naming.provider.url>t3://localhost:7001</env.java.naming.provider.url> </properties> <cross-site-constraint> <allow-origin>*</allow-origin> </cross-site-constraint> </service>
JMS Integration Verification
To verify that the JMS integration is working, perform the following steps:
- Start Oracle WebLogic Server.
- Start the Gateway as described in Setting Up the Gateway.
- In a browser, navigate to the out of the box demos at
http://localhost:8001/demo/
. - Click the JavaScript demo.
- Change the value for Location to
ws://localhost:8001/jmsWeblogic
. - Change the value of all Destination fields to
/topic/testTopic
. You must prefix the destination name with/queue/
or/topic/
depending on the destination type or the client will not connect. - Click Connect.
- The message
"CONNECT: ws://localhost:8001/jmsWeblogic"
should appear in Log messages followed by the message"CONNECTED: ID:id_value."
- Click Subscribe.
- Click Send. You should see the message that you sent in Log messages.
Subscription and Destination Support
Kaazing Gateway integration with Oracle WebLogic JMS has the following subscription and destination support:
- Durable subscriptions are not supported.
- Dynamic destinations are not supported.
- Static destinations supported. Ensure that you do not configure the
destination.strategy
property in the jms service. Using that property will cause problems with static destinations. If you choose to retrieve destinations using session methods, each client connection to the Gateway will need to provide a destination syntax conforming to the WebLogic server requirements. See Using Distributed Destinations from Oracle for more details.
Notes
- To use the out of the box JavaScript JMS Demo with WebLogic, you must first create the queue
/queue/testQueue
and topic/topic/testTopic
in WebLogic using the WebLogic console. - On UNIX or Linux, use
file:///tmp
as the value forenv.java.naming.provider.url
. - You can also connect to your Oracle WebLogic server using SSL and the
env.java.naming.provider.url
element and the URI schemet3s://
. For more information, see Additional Security Configuration for Stand-alone Clients. - Because you are using a JMS provider that does not support individual message acknowledgement, you must ensure your client applications acknowledge each message received from a queue or durable subscriber. Otherwise, the client will receive only one message from that queue or durable subscriber.
See Also
- For information on troubleshooting JMS integration, see Troubleshoot JMS Integration.
- For information on troubleshooting JMS clients, see Troubleshoot Your Clients.
- For general troubleshooting information, see Troubleshoot Kaazing Gateway.