| |||||||||||||||||||||||||||||||||||||||||||||||||
Resin 3.1 Documentation Examples Changes Overview Installation Configuration Quercus SOA/IoC JSP Servlets and Filters Admin (JMX) EJB Amber Security Performance Hessian XML and XSLT Third-party Troubleshooting/FAQ JAXB Annotations IoC Annotations JAX-WS Annotations JMS Configuration init bean CronResource RMI Resource FAQ |
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. ConnectionFactoryThe <resource jndi-name="jms/factory" type="com.caucho.jms.ConnectionFactoryImpl"/> 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 jdbc-manager configuration of the connection factory causes creation of a jdbc queue or topic instead. <resource jndi-name="jms/factory" type="com.caucho.jms.ConnectionFactoryImpl"/> <init> <jdbc-manager> <data-source>jdbc/database</data-source> </jdbc-manager> </init> </resource>
JDBC Queue/TopicThe JDBC Queue and Topic store the messages using a JDBC DataSource. The data source is defined in a <database> element. Resin's internal file-based database can be used for single-JVM messaging. A central database is used for clusters and situations where more than one is a producer or consumer. JdbcQueue configuration<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>
JdbcTopic configuration<database> <jndi-name>jdbc/jms</jndi-name> <driver> <type>com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource</type> <url>jdbc:mysql://localhost:3306/</url> <user> </user> <password> </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>
jdbc-manager
Memory Queue/TopicThe 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/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> <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>
|