users@glassfish.java.net

Re: How to bind my MDB to a Non-JMS Resource Adapter?

From: Markus KARG <markus.karg_at_gmx.net>
Date: Sun, 27 Jan 2008 11:34:33 +0100

Dies Koper schrieb:
> Your resource-adapter-mid setting looks good.
>
> Did you happen to leave in the mappedName attribute in the
> @MessageDriven annotation in your source?
> Or do you happen to have any resource-env-ref or resource-ref
> definitions in your ejb-jar.xml for this bean?
> How about other @Resource or @Resources annotations in your bean's
> source?
> Do you see any other error messages in the server.log?
There is neither of that. I do not use ejb-jar.xml at all, and here is
the complete code of the MDB:

@MessageDriven
public class MailMessageDrivenBean implements MailMessageListener {

    @Override
    public void onMail(final Mail mail) {
       // Do nothing for now, since this is only a sample.
    }

}


Thanks
Markus
>
>
> Markus KARG wrote:
>>
>>> Your second try (using <resource-adapter-mid>) was the correct way.
>>> If that didn't work something else must be wrong.
>>> I'd need more info to make an educated guess at what it could be.
>> Just tell me all the information that you need and I will send you.
>>
>> Thanks
>> Markus
>>>
>>> Markus KARG wrote:
>>>> I have deployed a self-written Non-JMS Resource Adapter, which
>>>> implementes solely an inbound (message inflow).
>>>> Now I want to bind a self-written MDB to it. The MDB gets deployed,
>>>> but GlassFish always binds it to jmsra.
>>>> Certainly that fails.
>>>>
>>>> How to I tell GlassFish to bind my MDB to my RA?
>>>>
>>>> The MID of the RA is "x", so:
>>>>
>>>> * I tried @MessageDriven(mappedName = "x"). Doesn't work. GF tries
>>>> to find "x" as a JMS resource (says the log).
>>>> * I tried <resource-adapter-mid>x</resource-adapter-mid>. Doesn't
>>>> work. GF says it has a problem with "TO x" (says the log).
>>>>
>>>> I spent hours to link those things together, but it just will not
>>>> work. I have used RAs and MDBs in JOnAS for years, but with
>>>> GlassFish there seems to be a trick I just cannot find out. :-(
>>>>
>>>> Any ideas?
>>>>
>>>> GF version used is: Jave EE SDK Updated 4.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>


-- 
http://www.xing.com/go/invita/58469