users@glassfish.java.net

Re: Please help: Exception in creating message-driven bean container

From: Rama Sundari <sundari.drs_at_gmail.com>
Date: Tue, 16 Sep 2008 12:11:52 +0530

hi..
thanku so much..
now the bean is getting deployed and activateendpoint() mehtod is getting
invoked.
can u tell me any resources where i can get some details about the MDB and
resource adapter communication..with out JMS..

thanks,
rama.



On Mon, Sep 15, 2008 at 10:58 PM, <glassfish_at_javadesktop.org> wrote:

> Hi,
>
> You have to use "sun-ejb-jar.xml" with "mdb-resource-adapter" and
> "resource-adapter-mid" elements, to bind the MDB with the RA.
>
> For example:
>
> [code]
> <?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>
> <name/>
> <ejb>
> <ejb-name>TestBean</ejb-name>
> <jndi-name>TestBean</jndi-name>
> <pass-by-reference>false</pass-by-reference>
> <mdb-resource-adapter>
>
> <resource-adapter-mid>TheRAnameYouSeeInAdminConsole</resource-adapter-mid>
> </mdb-resource-adapter>
> </ejb>
> </enterprise-beans>
> </sun-ejb-jar>
> [/code]
>
> Note: In case you are deploying an EAR archive with the RA implementation
> embedded with the MDB, you have to change "TheRAnameYouSeeInAdminConsole"
> for "YourEarNameWithoutExtension#YourRarNameWithoutExtension".
>
>
> But, althought the RA is implementing
> "javax.resource.cci.ConnectionFactory" , you won't directly receive
> asynchronous messages (because "javax.resource.cci.Connection" is only
> "opened" on demand by your applications).
> Remember that the "subscribed" MDBs will only activate a
> MessageEndpointFactory in the RA, and the RA can use the
> MessageEndpointFactory to "create" an MDB instance (endpoint) to invoke the
> onRequest() method when it receive a message from the physical connection.
>
>
> I hope it works for your project.
> [Message sent by forum member 'jmarine' (jmarine)]
>
> http://forums.java.net/jive/thread.jspa?messageID=299396
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>


-- 
Thanks,
Rama Sundari.