users@glassfish.java.net

Re: Portable equivalent to 'mappedName' for an MDB?

From: <glassfish_at_javadesktop.org>
Date: Fri, 04 May 2007 15:21:56 PDT

Yes - the failure is due to the "queue/myDestination" being 'Illegal' syntax for the particular JMS provider's physical destination naming syntax - which is provider dependent and not standardized. In this case, GF includes Sun Java System Message Queue and the rules for legal destination names are set by JMQ.

Unfortunately, this is not easy to find in the docs - but if you look hard enough, you'll find the following in the MQ Admin Guide on physical destination names

http://docs.sun.com/source/819-0066/physical_destinations.html

># The physical destination name. The naming rules are as follows:
>
> * The name must contain only alphanumeric characters. It cannot contain spaces.
> * The name can begin with an alphabetic character, the underscore character (_ ) or the dollar sign ($).”


-George


> Sorry, I should have added more details:
> @MessageDriven(activationConfig = {
> @ActivationConfigProperty(propertyName =
> "destinationType",
> ropertyValue = "javax.jms.Queue"),
>
> ActivationConfigProperty(propertyName="destination",
> propertyValue="queue/myDestination")
>
> fails at deploy-time:
>
> (...)
> Caused by: java.lang.IllegalArgumentException:
> MQJMSRA_AS4001:
> setDestination:Invalid destination
> name=queue/myDestination
> at
> essaging.jms.ra.ActivationSpec.setDestination(Activati
> onSpec.java:356)
>
> thanks,
> -Alexis
[Message sent by forum member 'tharakan' (tharakan)]

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