All Examples
package examples.jms
- Working with JMS Queues
- QueueReceive
- QueueSend
- QueueBrowse
- Working with JMS Topics
- TopicSend
- TopicReceive
- A graphical demo of JMS Topic features - JMSDrawDemo
- Sending JMS messages from a servlet - SenderServlet
- Combining JMS and EJB
- TraderServlet
- TraderReceive
- Creating a JMS message consumer with a WebLogic Startup class
- MsgListener
- PoolReceive
- ServerReceive
- Using WebLogic Server JMS session pools
- MsgListener
- TopicPool
- QueuePool
- Using message selectors and durable subscriptions - WebshareServlet
The examples in this package show how to set up JMS objects for access to
JMS Queues and Topics and how to send and receive messages.
To use the examples, set up a JDBC connection pool
for JMS and register example Queues and Topics in the weblogic.properties file.
-
When you use JMS with EJBeans together in transactions, both must use the same JDBC connection
pool. The following properties define a Cloudscape JDBC connection pool and
tell JMS to use that pool:
weblogic.jdbc.connectionPool.demoPool=\
url=jdbc:cloudscape:demo,\
driver=COM.cloudscape.core.JDBCDriver,\
initialCapacity=1,\
maxCapacity=5,\
capacityIncrement=2
props=user=none;password=none;server=none
weblogic.allow.reserve.weblogic.jdbc.connectionPool.demoPool=everyone
weblogic.jms.connectionPool=demoPool
-
The TraderServlet and TraderReceive examples use an EJBean and a durable subscription.
To set up the durable subscription for this example, create a connectionFactory
with the following two properties:
weblogic.jms.connectionFactoryName.trader=weblogic.jms.connectionFactory
weblogic.jms.connectionFactoryArgs.trader=ClientID=traderReceive
You must also build and deploy the statelessSession EJB
example to use the Trader JMS examples.
-
The SenderServlet.java example is an HTTP Servlet that allows you to send
messages to the example Topic or Queue from a browser. The TraderServlet example sends
"buy" and "sell" orders to the example Topic for use with the TraderReceive example.
Add the following properties to
weblogic.properties to make the servlets
available from your WebLogic Server:
weblogic.httpd.register.jmssender=examples.jms.sender.SenderServlet
weblogic.httpd.register.jmstrader=examples.jms.trader.TraderServlet
There are additional instructions on the pages for the examples.
there's more...
Read more about WebLogic JMS in the Developers Guide,
Using
WebLogic JMS.
Copyright © 1997-2000 BEA Systems, Inc.
All rights reserved.
Last updated
11/23/1999