book
Article ID: KB0084799
calendar_today
Updated On:
Description
Resolution:
The following steps have been tested with a Weblogic Server 10.3 and EMS 5.x server running on the same windows XP host. You can refer to following steps to integrate EMS 5.x with Weblogic Server 10.3:
1. In Weblogic Server 10.3 administrator console, create EMS Foreign JMS Server, ConnectionFactory and Destination:
1.1 Modify C:\bea\wlserver_10.3\samples\domains\wl_server\bin \setDomainEnv.cmd to add TIBCO Enterprise Message Service client jar file: %EMS_HOME%\lib\tibjms.jar to Weblogic CLASSPATH.
1.2 Open a new command prompt window and change directory to: C:\bea\wlserver_10.3\samples\domains\wl_server\bin. Run the script startWebLogic.cmd to start Weblogic 10.3 server.
1.3 When the WebLogic 11.3 server completes startup, it will automatically point your default browser to the examples page. If it does not, start a web browser and load the page, http://<machineName>:7001/console/login/LoginForm.jsp . Click on the Administration Console link. Enter weblogic as the Username and Password and click Sign In.
1.4 In the Administration Console left pane, select wl_server->Services->Messaging->JMS Modules.
1.5 In the right pane, click the “new” link. Enter “TIBCO JMS Module” in the Name box, “JMS module for TIBCO EMS” in the Descriptor File Name box, “TIBCO-EMS” in the “Location In Domain box”.
1.6 Click Next button, select the target server “examplesServer” check box.
1.7 Click Next button, select “Would you like to add resources to this JMS system module?” check box, then click finish button.
1.8 In the “Settings for TIBCO JMS Module” page, click the “New” link.
1.9 Select the “Foreign Server” check box, and then click the Next button.
1.10 Enter “TIBCO EMS Server” in the Name box, then click the Finish button.
1.11 In the “Settings for TIBCO JMS Module” table, click the link of “TIBCO EMS Server”.
1.12 Enter com.tibco.tibjms.naming.TibjmsInitialContextFactory in the JNDI Initial Context Factory box, and tibjmsnaming://localhost:7222 in the JNDI Connection URL box, and the property in “JNDI Properties” box as below for JNDI lookup user name: java.naming.security.principal=<user name>
Enter the JNDI lookup password in JNDI Properties Credential box.
1.13 Select the “Default Targeting Enabled” check box, and click Save.
1.14 On the top of “Settings for TIBCO EMS Server” page, select “Configuration -> Connection Factories” tab, click the “New” link.
Enter “TIBCO JMSTopicConnectionFactory” in the Name box, TIBCO.tcf in the Local JNDI Name box, and TopicConnectionFactory in the Remote JNDI Name box, “emsuser” in the User Name box, and “emspassword” in the Password box. Click OK.
Note: TopicConnectionFactory is a topic connection factory defined in EMS server. In factories.conf, it is defined as following:
[TopicConnectionFactory]
type = topic
url = tcp://localhost:7222
“emsuser “ and “emspassword” are the EMS username and password created in EMS server.
1.15 On the top of “Settings for TIBCO EMS Server" page, select “Configuration -> Destinations” tab, click the “New” link.
1.16 Enter “TIBCO EMS Topic quotes” in the Name box, “TIBCO.quotes” in the Local JNDI Name box, and “quotes” in the Remote JNDI Name box. Click OK and activate the changes. Restart Weblogic Server 10.3.
Note: “quotes” is a topic created in EMS server.
2. Modifying the Sample MDB Class File to Use TIBCO Enterprise Message Service Objects
The MessageTraderBean.java file is located in following directory: <weblogic_installation>\samples\server\examples\src\examples\ejb\ejb20\message
You need to modify the MessageTraderBean.java file as following:
2.1 Add this import declaration to the top of the file:
import weblogic.ejbgen.ForeignJmsProvider;
2.2 Add these tags to the top of the file. The connectionFactoryJndiName property is set to TIBCO.tcf, which is the local JNDI ConnectionFactory defined above.
@ForeignJmsProvider(connectionFactoryJndiName="TIBCO.tcf")
2.3 Modify the MessageDriven tag, so that the destinationJndiName property is TIBCO.quotes, and the transactionType property is BEAN driven.
For example:
@MessageDriven(maxBeansInFreePool = "200",
destinationType = "javax.jms.Topic",
initialBeansInFreePool = "20",
transTimeoutSeconds = "0",
defaultTransaction = MessageDriven.DefaultTransaction.NOT_SUPPORTED,
transactionType = MessageDriven.MessageDrivenTransactionType.BEAN,
durable = Constants.Bool.FALSE,
ejbName = "messageDriven",
destinationJndiName = "TIBCO.quotes",
acknowledgeMode = MessageDriven.AcknowledgeMode.DUPS_OK_ACKNOWLEDGE)
3. Rebuild and deploy the Example MDB
3.1 Under directory <weblogic_installation>\samples\server\examples\src\examples\ejb\ejb20\message, run C:\bea\wlserver_10.3\samples\domains\wl_server\bin \setDomainEnv.cmd to set the CLASSPATH.
3.2 Enter following commands to build and deploy the MDB:
ant build
ant deploy
4. Send messages to the topic “quote” in EMS server. Check the Weblogic Server 10.3 log and make sure the messages are received by MDB.
Issue/Introduction
How to integrate EMS 5.x with Weblogic Server 10.3?