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: Mon, 28 Jan 2008 19:31:13 +0100

Dies,

I thank you so much! Yes, you are right, when doing that change the
deployment works pretty well! :-)

Be assured that I will file a bug report at once, because the wrong
structure actually is told in the original Sun documentation that opens
when clicking through the GlassFish developer guide:
http://docs.sun.com/app/docs/doc/819-3672/bealk?a=view#indexterm-847

Thanks so much!
Markus

Dies Koper schrieb:
> The problem was your <resource-adapter-mid> definition after all.
>
> You wrote in sun-ejb-jar.xml:
>
> <ejb>
> <ejb-name>MailMessageDrivenBean</ejb-name>
> </ejb>
> <mdb-resource-adapter>
> <resource-adapter-mid>mailra-1.0.0-SNAPSHOT</resource-adapter-mid>
> </mdb-resource-adapter>
>
> It should be:
>
> <ejb>
> <ejb-name>MailMessageDrivenBean</ejb-name>
> <mdb-resource-adapter>
> <resource-adapter-mid>mailra-1.0.0-SNAPSHOT</resource-adapter-mid>
> </mdb-resource-adapter>
> </ejb>
>
> You could try filing a bug (enhancement) to have the verifier, or even
> normal deployment, to do a proper DTD check on sun-ejb-jar.xml and
> pick up such things.
>
>
> Markus KARG wrote:
>> I sent the modules directly to you. Since it is a pre-alpha I do not
>> want to publish it in the mailing list.
>>
>> Dies Koper schrieb:
>>> All looks good..
>>> Except for the errors in the log of course.
>>>
>>> May we see your application (both MDB and RA)? The EAR/RAR/xx
>>> modules you deployed are fine, no need for source or NetBeans
>>> project files.
>>>
>>> And it is dinner time for me, I'd look at them tomorrow.
>>>
>>> Markus KARG wrote:
>>>> 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
>
>
> ---------------------------------------------------------------------
> 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