WEB-INF/web.xml

<web-app xmlns="http://caucho.com/ns/resin">
  <!--
     - Configures the Message Listener connector with a MessageSender
     - to send messages to and a ListenerEndpoint to receive messages
    -->
  <connector>
    <type>com.caucho.jms.jca.ResourceAdapterImpl</type>

    <!--
       - Configures the Listener with the Resin ConnectionFactory and Queue.
       - Other JMS 1.1 implementations can replace the connectionAbstract-factory
       - and destination.
      -->
    <resource-adapter>
      <init>
        <connection-factory resin:type="com.caucho.jms.ConnectionFactoryImpl"/>

        <destination resin:type="com.caucho.jms.jdbc.JdbcQueue">
          <data-source>jdbc/resin</data-source>
          <queue-name>test</queue-name>
        </destination>
      </init>
    </resource-adapter>

    <!--
       - The MessageSender sends messages to the configured queue.
      -->
    <connection-factory jndi-name="jms/sender"
                        type="com.caucho.jms.jca.MessageSenderManager"/>

    <!--
       - The listener receives messages and processes them.
      -->
    <message-listener type="com.caucho.jms.jca.MessageListenerSpec">
      <endpoint-factory type="com.caucho.jms.jca.ListenerEndpointFactory">
        <init>
          <listener resin:type="example.MyListener"/>
        </init>
      </endpoint-factory>
    </message-listener>
  </connector>

  <!--
     - The test servlet uses bean-style init to simplify the code.
     - Applications may want to use a standard init-param and
     - JNDI lookup in the init() method.
    -->
  <servlet servlet-name="send" servlet-class="example.MessageServlet">
    <init>
      <sender>${jndi:lookup("jms/sender")}</sender>
    </init>
  </servlet>

  <servlet-mapping url-pattern="/send" servlet-name="send"/>
</web-app>