weblogic
Username: weblogic
Password: 12345678
Console: http://localhost:7001/console
How to configure JMS service (MOM) on weblogic:
1. Start the database
2. Start weblogic
3. Start the browser and enter http://localhost:7001/console in the address bar. Enter the user name and password in the login interface to enter the management interface, weblogic needs to lock the configuration library.
Click "Lock & Edit"
4. The steps to configure the JMS service are:
4.1 Configuring Message Stores --- where messages are stored
4.2 Configuring JMS Servers (JMS Servers)---Servers Accessed by Message Producers/Consumers
4.3 Configure message destinations (Destinations) ----> object
4.4 Configure Connection Factories ----> Object
4.1 Configuring Message Stores
The message storage method in weblogic can be divided into two ways, one is to save the message to the file system, and the other is to save the message to the database. The following describes the configuration of the two storage methods.
a. Configuration file storage method:
From the tree menu on the left side of the browser, select:
Services->Persistent Stores
Click the link New->Create FileStore on the right side of the browser,
Enter the following information:
Name: JMS File Store
Target: AdminServer
Directory: c:\jmsstore (make sure you have read and write permissions to this directory)
Click the bottom button finish to complete the operation
b. Configure the database storage method:
Prerequisite: You have configured the JDBC connection pool (Connection pool), and the connection pool is running.
From the tree menu on the left side of the browser, select:
Services->Persistent Stores
Click the link New->Create JDBCStore on the right side of the browser
Enter the following information:
Name: JMS JDBC Store
Target: AdminServer
Data Source: <select the configured data source>
Prefix Name: jms (to prevent table name conflict, you can enter a different prefix)
Click the bottom button finish to complete the operation
4.2 Configuring JMS Servers (JMS Servers)
Each JMS Server can only manage one message storage medium. For the above configuration, we configure two JMS Servers to manage the storage mode of file mode and database mode respectively.
a. Configuration file storage JMS Server
From the tree menu on the left side of the browser, select:
Services->Messaging->JMS Servers
Click New on the right side of the browser,
Enter the following information:
Name: JMS File Server
Persistent Store: JMS File Store
Click the Next button at the bottom to enter the next page, select:
Target: AdminServer
Click finish to complete the operation.
b. Configure database storage JMS Server
From the tree menu on the left side of the browser, select:
Services->Messaging->JMS Servers
Click New on the right side of the browser,
Enter the following information:
Name: JMS JDBC Server
Persistent Store: JMS JDBC Store
Click the next button at the bottom to enter the next page, select:
Target: AdminServer
Click finish to complete the operation.
4.3 Configuring message destinations (Destinations)
The message destination is managed by the JMS Server, how the message is stored is to configure the message destination is
transparent. Therefore, only configure the destination managed by JMS File Server as an example. There are two types of destinations: Queue and Topic, which are configured separately below.
a. Configure Queue
From the tree menu on the left side of the browser, select:
Services->Messaging->JMS Modules
Click to create a new Jms Module and enter the following information
Name:SystemModule
next->
Target: AdminServer
next->
选择 Would you like to add resources?
finish
Click the new button to create a new Resource
Type:Queue
Click the Next button at the bottom
Name: JMS File Queue
JNDI Name: jms/fileQueue
Click the bottom button Next
Click on create new subDeployment
SubDeployment Name: JMS Subdeployment
Click: ok
Target:AdminServer
finish finish
Target: JMS File Server finish configuration
b. Configure Topics
From the tree menu on the left side of the browser, select:
Services->Messaging->JMS Modules
Select the JMS module that needs to configure the queue on the right side of the browser
Click the new button at the bottom
Type:Topic
Click the Next button at the bottom
Name: JMS File Topic
JNDI Name: jms/fileTopic
Click the bottom button Next
Subdeploymenet: JMS Subdeploymenet
Target: JMS File Server
finish completes the configuration
4.4 Configuring Connection Factories
The connection factory in JMS is divided into QueueConnectionFactory and TopicConnectionFactory
Both, Weblogic does not distinguish between these two types. But we'd better configure both factory types.
a. Configure QueueConnectionFactory
From the tree menu on the left side of the browser, select:
Services->Messaging->JMS Modules
Expand the above module and create a new Resource
Type: Connection Factory
next->
Name: JMS QueueConnection Factory
JNDI Name: jms/QueueConnectionFactory
next->
SubDeployments:JMS SubDeployment
Targets:JMS File Server
Click finish to end the factory configuration
b. Configure TopicConnectionFactory
From the tree menu on the left side of the browser, select:
Services->Messaging->JMS Modules
Expand the above module and create a new Resource
Type: Connection Factory
next->
Name: JMS TopicConnection Factory
JNDI Name: jms / TopicConnectionFactory
next->
SubDeployments:JMS SubDeployment
Targets:JMS File Server
Click finish to end the factory configuration