Configure WebLogic
WebLogic Configuration
Configuring WebLogic using the Administration Console to function with JMS LAM has following steps:
Creating a WebLogic JMS Server.
Creating a WebLogic JMS Module.
Creating a Subdeployment for a WebLogic JMS Module
Creating a WebLogic JMS Connection Factory.
Creating a JMS Queue.
Creating a JMS Topic.
Create a WebLogic JMS Server
A JMS server is the container that manages JMS queue and topic destinations. A JMS Server can be configured to persist messages, so they can be delivered even if the server instance they were received at went down.
Enter the URL
http://localhost:7001/console
in a browser.The Oracle WebLogic Server Administration Console 12c login page opens.Enter the Username and Password that were defined during the WebLogic installation.The Oracle WebLogic Server Administration Console 12c opens.
Expand Services, in the Domain Structure panel on the left, and expand Messaging, then select JMS Servers.
Click New in the Summary of JMS Servers view in the right panel to create a new JMS Server.
Enter the server name E.g. MyJMSServer in the Name field and click on Next in the JMS Server Properties view of the Create a New JMS Server dialog.
Leave the Persistent Store settings view and click Next.
Select the target, for example, AdminServer, in the Target field of the Select targets view, and click Finish.
Note
The server shown in the drop down of the Target field is the server created during installation of WebLogic
The JMS Server is created and can be viewed in the Summary of JMS Servers view.
Create a WebLogic JMS Module
A JMS System Module contains the created queue or topic and the connection factory.
The Oracle WebLogic Server Administration Console 12c is open.
In the left-hand panel in Domain Structure, click on JMS Modules under Messaging.
Create a new JMS Module by clicking New in the Summary of JMS Modules view.
Enter the Name of the module, for example, MyJMSModule, in the Create JMS System Module dialog and click Next.
Select the checkbox AdminServer in the target setting view and click Next.
Select the check box to add resource to the new JMS System Module and click Finish.
The JMS Module is created and can be viewed in the Summary of JMS Modules view.
Creating a Subdeployment for a WebLogic JMS Module
The Oracle WebLogic Server Administration Console 12c is open.
In the left hand panel in Domain Structure, click JMS Modules under Messaging.
Click on the JMS Module MyJMSModule in the Summary of JMS Modules view and select the Subdeployments tab. The MyJMSModule was created in the above procedure.
Click New, then enter the Subdeployment Name e.g. MySubdeployment in the Create a New Subdeployment dialog and click Next.
Select the checkbox MyJMSServer in the target setting view and click Finish.
The sub deployment of the JMS Module is created and can be viewed in the Subdeployments tab of the JMS Module.
Creating a WebLogic JMS Connection Factory
A Connection Factory defines a set of connection configuration parameters that are used to create connections for JMS clients.
The Oracle WebLogic Server Administration Console 12c is open.
Go to the left hand panel in Domain Structure and click on JMS Modules under Messaging.
Click on the JMS Module MyJMSModule in the Summary of JMS Modules view. The MyJMSModule was created in the above procedure.
Click on New in the Settings for MyJMSModule dialog.
Select the Connection Factory check box from the list of resources and click Next.
Enter the name in the Name field. E.g. MyConnectionFactory and JNDI name E.g. jms/MyConnectionFactory in the JNDI Name field, then click Next.
The AdminServer is selected by default. Click Finish.
The Connection Factory is created and can be viewed in the Summary of Resources section.
Creating a WebLogic JMS Queue
Go to the left hand panel in Domain Structure, click on JMS Modules under Messaging.
Click on the JMS Module MyJMSModule in the Summary of JMS Modules view.
Click New in the Summary of Resources of the JMS Module MyJMSModule.
Select the Queue check box from the list of resources and click Next.
Enter the name in the Name field. E.g. MyTestQueue and JNDI name E.g. jms/MyTestQueue in the JNDI Name field, then click Finish.
The Queue is created and can be viewed in the Summary of JMS Modules view.
Creating a WebLogic JMS Topic
Go to the left hand panel in Domain Structure, click JMS Modules under Messaging.
Click the JMS Module MyJMSModule in the Summary of JMS Modules view.
Click New in the Summary of Resources of the JMS Module MyJMSModule.
Select the Topic check box from the list of resources and click Next.
Enter the name in the Name field. E.g. MyTestTopic and JNDI name E.g. jms/MyTestTopic in the JNDI Name field, then click Finish.
The Topic is created and can be viewed in the Summary of Resources view of the module.
SSL Configuration for WebLogic (Optional)
To enable SSL communication via queue the SSL configuration is done in the WebLogic. It includes creation of SSL server and client certificates which are used for authentication during communication.
Note
The following procedure is same for both Windows and Linux
Note
If the SSL configuration is already implemented for WebLogic, then this configuration can be skipped
To create the certificates:
Create a new directory, SSL, in the directory where the Weblogic jar file is stored. For example, navigate to a directory using the command cd setup, then use the command mkdir SSL.
Navigate to the newly created directory SSL using the command cd SSL.
Enter the command mkdir serverstore and mkdir castore. This creates two new directories in the SSL directory.
Note
The serverstore directory stores the server certificates, while the castore store directory will store the client certificates
Create, sign and install the client certificates by entering the following commands one by one:
cd castore keytool -genkeypair -keystore castore.jks -storepass welcome1 -alias rootca -keypass welcome1 -keyalg RSA keytool -certreq -keystore castore.jks -storepass welcome1 -alias rootca -keypass welcome1 -file rootca.csr -v keytool -gencert -alias rootca -keypass welcome1 -keystore castore.jks -storepass welcome1 -ext BC=2 -rfc -infile rootca.csr -outfile rootca.cer keytool -importcert -alias rootca -keypass welcome1 -keystore catruststore.jks -storepass welcome1 -file rootca.cer
The following files are generated in the castore directory after executing the above commands:
castore.jks
catruststore.jks
rootca
rootca.csr
Create, sign and install the server certificates enter the following commands one by one:
cd .. cd serverstore keytool -genkeypair -keystore server.jks -storepass welcome1 -alias 100bytesServer -keypass welcome1 -keyalg RSA keytool -certreq -keystore server.jks -storepass welcome1 -alias 100bytesServer -keypass welcome1 -file 100bytesServer.csr -v keytool -gencert -alias rootca -keypass welcome1 -keystore ../castore/castore.jks -storepass welcome1 -ext BC=2 -rfc -infile 100bytesServer.csr -outfile 100bytesServer.cer keytool -importcert -alias rootca -keypass welcome1 -keystore server.jks -storepass welcome1 -file ../castore/rootca.cer keytool -importcert -alias 100bytesServer -keypass welcome1 -keystore server.jks -storepass welcome1 -file 100bytesServer.cer keytool -importcert -alias rootca -keypass welcome1 -keystore servertruststore.jks -storepass welcome1 -file ../castore/rootca.cer
Note
The path given in the commands above is for Linux, for windows you have to replace "/" with "\"
The following files are generated in the serverstore directory after executing the above commands:
100bytesServer
100bytesServer.csr
server.jks
servertruststore.jks
Enter the URL
http://localhost:7001/console
in a browser.The Oracle WebLogic Server Administration Console 12c login page opens.Enter the Username and Password defined during the WebLogic installation. The Oracle WebLogic Server Administration Console 12c opens.
Go the left hand panel Domain Structure and click on Servers under Environment.
Go to the Summary of Servers page in the right panel and click on the listed server E.g. AdminServer.
Go to the General tab of the Settings for AdminServer, select the check box SSL Listen Port Enabled and enter 7002 in SSL Listen Port. TheListen Port Enabled is already selected and 7001 is entered in the Listen Port field.
Go to the Keystore tab of the Settings for AdminServer, click Change.
Select Custom Identity and Custom Trust in Keystores dropdown, then click Save.
Enter the following parameters:
Custom Identity Keystore: The path of the server.jks file created after running SSL configuration commands. E.g. setup/ssl/serverstore/server.jks
Custom Identity Keystore Type: jks
Custom Identity Keystore Passphrase: The keypass used in the commands. E.g. welcome1
Custom Trust Keystore: The path of the serverstore.jks file created after running SSL configuration commands . E.g. setup/ssl/serverstore/servertruststore.jks
Custom Trust Keystore Type: jks
Custom Trust Keystore Passphrase: The keypass used in the commands. E.g. welcome1
Confirm Custom Identity Keystore Passphrase and Confirm Custom Trust Keystore Passphrase: Enter the same keypass
Go to the SSL tab of the Settings for AdminServer and set the following parameters:
Private Key Alias: The alias used in the commands. E.g. 100bytesServer
Private Key Passphrase: The keypass used in the commands. E.g. welcome1
Confirm Private Key Passphrase: The keypass used in the commands. E.g. welcome1
The SSL configuration is completed for WebLogic.