users@glassfish.java.net

Re: How to attach a MDB to a queue on an other server

From: <glassfish_at_javadesktop.org>
Date: Tue, 15 Jan 2008 00:54:43 PST

yeah, you're right, I forgot something really important about the MDB :)

you have to write a deployment descriptor for it which tells the server that the MDB uses your newly installed resources adapter.

sun-ejb-jar.xml:
<?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>YourMDBName</ejb-name>
                        <mdb-resource-adapter>
                                <!-- here is the resource adapter: -->
                                <resource-adapter-mid>imqjmsra</resource-adapter-mid>
                        </mdb-resource-adapter>
                </ejb>
        </enterprise-beans>
</sun-ejb-jar>

cheers
z
[Message sent by forum member 'zoltan_kiss' (zoltan_kiss)]

http://forums.java.net/jive/thread.jspa?messageID=253940