users@glassfish.java.net

howto specify queue of MDB in sun-ejb-jar.xml ?

From: <glassfish_at_javadesktop.org>
Date: Mon, 05 Nov 2007 16:49:23 PST

Hi,

How do I specify the queue used by a MDB in the sun-ejb-jar.xml rather than the @MessageDriven(mappedName = "jms/MyQueue") annotation ?

I guessed that the message-destination-ref element is what I need, but the way I've configured it doesn't work.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd">

<sun-ejb-jar>
  <enterprise-beans>
    <ejb>
      <ejb-name>HubToFabReceiverMDBean</ejb-name>
      <mdb-connection-factory>
        <jndi-name>jms/FabSan01ToPtsFactory</jndi-name>
      </mdb-connection-factory>
      [b]<message-destination-ref>[/b]
        <message-destination-ref-name>jms/MappedName</message-destination-ref-name>
        <jndi-name>jms/MyQueue</jndi-name>
     [b] </message-destination-ref>[/b]
  </ejb>
</enterprise-beans>
</sun-ejb-jar>


[b]I get these errors:[/b]

This ejb [HubToFabReceiverMDBean] has no message destination reference by the name of [jms/MappedName]
"DPL8007: Invalid Deployment Descriptors element jndi-name value jms/MyQueue"


[b]This is my bean:[/b]

@MessageDriven(mappedName = "jms/MappedName")
public class HubToFabReceiverMDBean implements MessageDrivenBean, MessageListener
{
...

Thanks

reply to: rupert123_at_spamex.com
[Message sent by forum member 'frenchdrip' (frenchdrip)]

http://forums.java.net/jive/thread.jspa?messageID=243964