This section demonstrates the procedure for using the sample MDB with EMS.
In a web browser, access Sun’s Java System Administration Tool at http://
host
:
admin_port
AppServer Instances->server1
C:\tibco\ems\clients\java\tibjms.jar
install_dir
\bin
, and run these commands:asadmin multimode asadmin>export AS_ADMIN_USER=admin
AS_ADMIN_PASSWORD=password
AS_ADMIN_HOST=hostname
AS_ADMIN_PORT=port
AS_ADMIN_INSTANCE=server
asadmin>create-jndi-resource --jndilookupname QueueConnectionFactory --resourcetype javax.jms.QueueConnectionFactory --factoryclass com.tibco.tibjms.naming.TibjmsInitialContextFactory --enabled=true --property java.naming.provider.url=tibjmsnaming\://localhost\:7222 jms/MyQcf asadmin>create-jndi-resource --jndilookupname queue.sample --resourcetype javax.jms.Queue --factoryclass com.tibco.tibjms.naming.TibjmsInitialContextFactory --enabled=true --property java.naming.provider.url=tibjmsnaming\://localhost\:7222 jms/MyQueue asadmin>reconfig server1
install_dir
\bin
. Modify appclient.bat
by adding C:\tibco\ems\clients\java\tibjms.jar
to JVM_CLASSPATH
.install_dir
\samples\ejb\mdb\simple\src
, then build and deploy the sample using the following commands:install_dir
\domains\domain1\server1\applications\j2ee-apps\mdb-simple_1
, and run this command:appclient -client mdb-simpleClient.jar -name SimpleMessageClient -textauthThe console should display these lines:
Sending message: This is message 1 Sending message: This is message 2 Sending message: This is message 3The server log should display these lines:
MESSAGE BEAN: Message received: This is message 1 MESSAGE BEAN: Message received: This is message 2 MESSAGE BEAN: Message received: This is message 3
TIBCO Enterprise Message Service™ Application Integration Guide Software Release 4.3, February 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |