users@glassfish.java.net

Re: InitialContext.lookup works but _at_Resource does not

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Mon, 15 Feb 2010 15:27:14 +0100

2010/2/12 Witold Szczerba <pljosh.mail_at_gmail.com>:
> The other problem still remains: I cannot deploy MDB.
> I was trying everything like adding a >name="eis/IVTQueue" into @MessageDriven<
> or declaring extra @Resource annotation on the MDB class and binding
> mappedName to name and then using that name in @MessageDriven and
> everything I found possible to do, but always the same:
>
> MDB00017: [eis/IVTQueue]: Exception in creating message-driven bean
> container: [com.sun.enterprise.connectors.ConnectorRuntimeException:
> Could not find physical destination : null]
> com.sun.enterprise.connectors.ConnectorRuntimeException
> com.sun.enterprise.connectors.ConnectorRuntimeException: Could not
> find physical destination : null
>
> The stack trace was attached few posts above (wmqtest-stacktrace_2.txt)
> Do you think I should start a new topic on this problem?
>
> Thanks,
> Witold Szczerba
>

Everything is OK with Glassfish. I did not know one has to specify the
Connector Module name for MDB. By default, Glassfish assumes it is the
one build-in. In my case it was "wmq.jmsra", so I have created
sun-ejb.jar:

<?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>ConsumerMDB</ejb-name>
          <mdb-resource-adapter>
              <resource-adapter-mid>wmq.jmsra</resource-adapter-mid>
          </mdb-resource-adapter>
      </ejb>
  </enterprise-beans>
</sun-ejb-jar>

Now, I had to specify "activation config" according to WMQ JMS RA
documentation and I was able to consume messages.

Thanks for all your help.

Regards,
Witold Szczerba