Mantis - Resin
Viewing Issue Advanced Details
4131 minor always 07-20-10 12:17 07-20-10 12:21
ferg  
ferg  
normal  
closed  
fixed  
none    
none 4.0.9  
0004131: CDI config timing issue: ee:Named and EL in config file
(rep by Jeff Schnitzer)

I can't seem to get a message driven bean hooked up to a queue up in
Resin 4.0.8. It's been a problem since at least 4.0.6. The problem
is pretty straightforward:

<web-app xmlns="http://caucho.com/ns/resin" [^]
            xmlns:ee="urn:java:ee"
            xmlns:jms="urn:java:com.caucho.jms"
            xmlns:test="urn:java:test"
            >

    <jms:FileQueue>
        <ee:Named>delivery</ee:Named>
    </jms:FileQueue>
    
    <ejb-message-bean class="test.DeliveryListener">
        <destination>#{delivery}</destination>
    </ejb-message-bean>
</web-app>

Whenever Resin tries to configure this, I get:

[10-07-19 22:13:35.994] {main} WEB-INF/resin-web.xml:14: #{delivery}
value must not be null.
      com.caucho.ejb.cfg.MessageBeanConfig.setDestination():
'destination' attribute may not be null

      12:
      13: <ejb-message-bean class="test.DeliveryListener">
      14: <destination>#{delivery}</destination>
      15: </ejb-message-bean>
      16: </web-app>

Is this not the correct way to create a named FileQueue? Is there
some other way to attach an ejb-message-bean to the queue?

The isolated sample project (not much besides that resin-web.xml) is here:

http://code.google.com/p/scratchmonkey/source/browse/#svn/resin4/message_driven_beans [^]

BTW the docs seem to be somewhat erratic. Some places
(http://www.caucho.com/resin-javadoc/com/caucho/jms/FileQueue.html) [^]
they say the config should be like this:

    <jms:FileQueue>
        <jms:name>delivery</jms:name>
    </jms:FileQueue>

...and some places
(http://caucho.com/resin-4.0/examples/jms-ioc-listener/index.xtp) [^] they
say it should be like this:

    <jms-queue name="delivery" />

Neither works :-(

Notes
(0004679)
ferg   
07-20-10 12:21   
ioc/23n3