users@glassfish.java.net

Re: InitialContext.lookup works but _at_Resource does not

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Fri, 12 Feb 2010 10:14:28 +0100

The problem appears to be much more serious :(

While I can work the @Resource problem around by using
InitialContext.lookup in producer, now I cannot deploy consumer
MessageDrivenBean, because it needs to find jms/IVTQueue by itself
during initialization.
This is how it looks like:

@MessageDriven(mappedName = "jms/IVTQueue", activationConfig = {
        @ActivationConfigProperty(propertyName = "acknowledgeMode",
propertyValue = "Auto-acknowledge"),
        @ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue")
    })
public class Consumer implements MessageListener {
    [...]
}

Now, when I deploy the module, Glassfish says:

MDB00017: [Consumer]: Exception in creating message-driven bean
container: [com.sun.enterprise.connectors.ConnectorRuntimeException:
Could not find physical destination : null]
[...]
EJB5090: Exception in creating EJB container
[com.sun.enterprise.connectors.ConnectorRuntimeException: Could not
find physical destination : null]
appId=WMQ-Test moduleName=_home_witoldsz_NetBeansProjects_WMQ-Test_build_classes
ejbName=Consumer
LDR5004: UnExpected error occured while creating ejb container

full log in attachment.


Could it be a bug in Glassfish (oh God I hope it is not).
I will try to map that jms resource in xml, but I does not seem to be
annotations issue.

Regards,
Witold Szczerba