skyscreamer / nevado

A JMS driver for Amazon SQS.

Home Page:http://nevado.skyscreamer.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Destination properties not injected via JNDI in Jetty

erm410 opened this issue · comments

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).