|
| |
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.
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>
|
Attribute | Meaning | default |
data-source | Optional JDBC DataSource | none
|
client-id | clientID value for durable subscriptions | none
|
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>
|
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>
|
Copyright © 1998-2005 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark,
and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc. | |
|