|
The ConnectionFactory resource defines the JMS factory
for creating JMS connections.
<resource jndi-name="jms/factory"
type="com.caucho.jms.ConnectionFactoryImpl">
<init>
<data-source>jdbc/database</data-source>
</init>
</resource>
| 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.
<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>
<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.
<resource jndi-name="jms/my-queue"
type="com.caucho.jms.memory.MemoryQueue">
<init>
<queue-name>my-queue</queue-name>
</init>
</resource>
<resource jndi-name="jms/my-topic"
type="com.caucho.jms.memory.MemoryTopic">
<init>
<topic-name>my-topic</topic-name>
</init>
</resource>
Copyright (c) 1998-2009 Caucho Technology, Inc. All rights reserved. caucho® ,
resin® and
quercus®
are registered trademarks of Caucho Technology, Inc.
|