📄 jms-config.xtp
字号:
<document> <header> <product>resin</product> <title>Resin JMS Configuration</title> <description> <p>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.</p> </description> </header> <body> <localtoc/><s1 title="ConnectionFactory"><p>The <code>ConnectionFactory</code> resource defines the JMS factoryfor creating JMS connections.</p><example title="ConnectionFactory resource"><resource jndi-name="jms/factory" type="com.caucho.jms.ConnectionFactoryImpl"/></example><p>If an application creates a named queue or topic using the the JMS Session,Resin's default behaviour is to create a memory queue or topic. The <a href="#jdbc-manager">jdbc-manager</a> configuration of the connection factory causes creation of a jdbc queue or topic instead.</p><example title="ConnectionFactory resource"><resource jndi-name="jms/factory" type="com.caucho.jms.ConnectionFactoryImpl"/> <init> <jdbc-manager> <data-source>jdbc/database</data-source> </jdbc-manager> </init></resource></example><deftable-childtags><tr><td>client-id</td> <td>clientID value for durable subscriptions</td> <td>pseudo-random generated value</td> </tr><tr><td>jdbc-manager</td> <td>Use jdbc queues and topics for queues and topics created using the JMS Session object, see <a href="#jdbc-manager">jdbc-manager</a></td> <td>use a memory queue for created queues and topics</td> </tr></deftable-childtags></s1><s1 title="JDBC Queue/Topic"><p>The JDBC Queue and Topic store the messages using a JDBC DataSource. The datasource is defined in a <database> element. Resin's internal file-baseddatabase can be used for single-JVM messaging. A central database is used forclusters and situations where more than one is a producer or consumer.</p><s2 title="JdbcQueue configuration"><example title="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> <jdbc-manager> <data-source>jdbc/resin</data-source> </jdbc-manager> </init></resource></example><deftable-childtags><tr><td>queue-name</td> <td>Name of the queue</td> <td>required</td> </tr><tr><td>jdbc-manager</td> <td>Configuration of database usage, see <a href="#jdbc-manager">jdbc-manager</a></td> <td>required</td> </tr></deftable-childtags></s2><s2 title="JdbcTopic configuration"><example title="Topic configuration with MySQL database"><database> <jndi-name>jdbc/jms</jndi-name> <driver> <type>com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource</type> <url>jdbc:mysql://localhost:3306/<var>jms</var></url> <user><var>username</var></user> <password><var>password</var></password> </driver> ...</database><resource jndi-name="jms/my-topic" type="com.caucho.jms.jdbc.JdbcTopic"> <init> <topic-name>my-topic</topic-name> <jdbc-manager> <data-source>jdbc/jms</data-source> </jdbc-manager> </init></resource></example><deftable-childtags><tr><td>topic-name</td> <td>Name of the topic</td> <td>required</td> </tr><tr><td>jdbc-manager</td> <td>Configuration of database usage, see <a href="#jdbc-manager">jdbc-manager</a></td> <td>required</td> </tr></deftable-childtags></s2><s2 title="jdbc-manager"><deftable-childtags><tr><td>consumer-table</td> <td>Name of the table to use for storing consumers</td> <td>resin_jms_consumer</td> </tr><tr><td>data-source</td> <td>JDBC DataSource</td> <td>required</td> </tr><tr><td>destination-table</td> <td>Name of the table to use for storing destinations</td> <td>resin_jms_destination</td> </tr><tr><td>message-table</td> <td>Name of the table to use for storing messages</td> <td>resin_jms_message</td> </tr><tr><td>purge-interval</td> <td>Frequency for purging of expired messages</td> <td>60s</td> </tr><tr><td>poll-interval</td> <td>Polling interval when there is a message listener</td> <td>no polling</td> </tr><tr><td>tablespace</td> <td>Tablespace for Oracle blobs only</td> <td>none</td> </tr></deftable-childtags></s2></s1><s1 title="Memory Queue/Topic"><p>The Memory Queue and Topic are non-persistent. If the server restartsor even if the Queue's environment restarts, the messaging data will belost. Applications needing persistent messaging should use the JDBCQueues.</p><example title="Memory Queue configuration"><resource jndi-name="jms/factory" type="com.caucho.jms.ConnectionFactoryImpl"/><resource jndi-name="jms/my-queue" type="com.caucho.jms.memory.MemoryQueue"> <init> <queue-name>my-queue</queue-name> </init></resource></example><example title="Memory Topic configuration"><resource jndi-name="jms/factory" type="com.caucho.jms.ConnectionFactoryImpl"/><resource jndi-name="jms/my-topic" type="com.caucho.jms.memory.MemoryTopic"> <init> <topic-name>my-topic</topic-name> </init></resource></example></s1></body></document>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -