Resin JMS Configuration
Resin 3.0

Features
Installation
Configuration
Web Applications
IOC/AOP
Resources
JSP
Servlets and Filters
Portlets
Databases
Admin (JMX)
CMP
EJB
Amber
EJB 3.0
Security
XML and XSLT
XTP
JMS
Performance
Protocols
Third-party
Troubleshooting/FAQ

Config
SwiftMQ
Tutorials
JMS
JMS
SwiftMQ

Configuration for Resin's JMS provider implementation. The JDBC Queues and Topics provide a persistent messaging store. The Memory Queues and Topics provide a low-overhead memory-based store.

  1. ConnectionFactory
  2. JDBC Queue/Topic
  3. Memory Queue/Topic

ConnectionFactory

The ConnectionFactory resource defines the JMS factory for creating JMS connections.

ConnectionFactory resource
<resource jndi-name="jms/factory"
           type="com.caucho.jms.ConnectionFactoryImpl">
  <init>
    <data-source>jdbc/database</data-source>
  </init>
</resource>

AttributeMeaningdefault
data-sourceOptional JDBC DataSourcenone
client-idclientID value for durable subscriptionsnone

JDBC Queue/Topic

The JDBC Queue and Topic store the messages using a JDBC DataSource. The data source will be defined in a <database> element. Resin's internal file-based database can be used for single-JVM messaging.

Queue configuration with Resin's database
<database jndi-name="jdbc/resin">
  <driver type="com.caucho.db.jdbc.ConnectionPoolDataSourceImpl">
     <path>WEB-INF/db</path>
  </driver>
</database>

<resource jndi-name="jms/my-queue"
           type="com.caucho.jms.jdbc.JdbcQueue">
  <init>
    <queue-name>my-queue</queue-name>
    <data-source>jdbc/resin</data-source>
  </init>
</resource>

Topic configuration with Resin's database
<resource jndi-name="jms/my-topic"
           type="com.caucho.jms.jdbc.JdbcTopic">
  <init>
    <topic-name>my-topic</topic-name>
    <data-source>jdbc/resin</data-source>
  </init>
</resource>

Memory Queue/Topic

The Memory Queue and Topic are non-persistent. If the server restarts or even if the Queue's environment restarts, the messaging data will be lost. Applications needing persistent messaging should use the JDBC Queues.

Memory Queue configuration
<resource jndi-name="jms/my-queue"
           type="com.caucho.jms.memory.MemoryQueue">
  <init>
    <queue-name>my-queue</queue-name>
  </init>
</resource>

Memory Topic configuration
<resource jndi-name="jms/my-topic"
           type="com.caucho.jms.memory.MemoryTopic">
  <init>
    <topic-name>my-topic</topic-name>
  </init>
</resource>


JMS
JMS
SwiftMQ
Copyright © 1998-2005 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.