skyscreamer / nevado

A JMS driver for Amazon SQS.
http://nevado.skyscreamer.org/
Apache License 2.0
51 stars 48 forks source link

Destination properties not injected via JNDI in Jetty #102

Open erm410 opened 9 years ago

erm410 commented 9 years ago

When referencing a JNDI injected destination in a Jetty servlet, only the name property is honored.

For example when a queue is created using

...
<New id="jmsConnectionFactory" class="org.eclipse.jetty.plus.jndi.Resource">
    <Arg><Ref id="wac" /></Arg>
    <Arg>jms/destination1</Arg>
    <Arg>
        <New class="org.skyscreamer.nevado.jms.destination.NevadoQueue">
            <Arg>destination1</Arg>
            <Set name="queueUrl">https://sqs.us-east-1.amazonaws.com/xxx/destination1</Set>
        </New>
    </Arg>
</New>
...

in jetty-env.xml, the looked-up resource has a null queueUrl.

This make it impossible to fully configure your destinations in jetty-env.xml and then inject them into a JMS provider agnostic existing application (since setting the lost properties requires a downcast to a Nevado specific type).