On 3/9/07, AsaUK <[EMAIL PROTECTED]> wrote:
I am using activemq-rar-4.1-SNAPSHOT.rar Maybe that is not recent enough. Still I am not too worried about that one as I can easily upgrade at a later date or just build the source. I think you are right with the null pointer, not a top error though. I will try and get that working. The external clients work by connecting to tcp://localhost:61616 and calling session.createQueue("FOO.BAR"); That works fine. I am just not sure how to get a class implementing MessageListener to point at that too. Basic mdb: @MessageDriven(mappedName = "jms/clientQueue", activationConfig = { @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"), @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") }) public class AutoGenMsgConsumer implements MessageListener { Logger log = Logger.getLogger( "AutoGenMsgConsumer" ); /** Creates a new instance of AutoGenMsgConsumer */ public AutoGenMsgConsumer() { } public void onMessage(Message message) { log.info( "Msg received by AutoGenMsgConsumer" ); } } The question is how do I tell it to listen to FOO.BAR? I know the answer will be really obvious once I know it I just can't figure it out! Do I need to create the whole resource thing, if so what should they be called? Do they need any special properties? Or is there some other cunning method I am missing?
I've not tinkered with EJB 3 message listeners yet; I'd have thought there's an annotation for specifying the actual destination. Though EJB being EJB, I suspect you might have to use JNDI rather than use a JMS destionation directly (why the web tier gets to use URIs as first class citizens but JMS does not is beyond me). So maybe the 'mappedName' is the JNDI name thats looked up to find the Queue object? -- James ------- http://radio.weblogs.com/0112098/