geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chi runhua <chirun...@gmail.com>
Subject Re: Trying to set up a MDB
Date Mon, 02 Nov 2009 14:00:07 GMT
Hi, two issues I noticed in your application:

1)  you need to use geronimo-applicaiton.xml for your ear to be deployed on
Geronimo successfully, which shall be put in the same directory with
application-xml
2)  jms resource should have a module name in the form of
groupId/artifactId/version/type

The plans for your reference:

geronimo-application.xml

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0">
    <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
        <moduleId>
            <groupId>org.apache.geronimo.samples</groupId>
            <artifactId>jms-mdb-ear</artifactId>
            <version>2.1.4</version>
            <type>car</type>
        </moduleId>
    </environment>
    <module>
       <connector>geronimo-activemq-ra-2.1.4.rar</connector>
       <alt-dd>jms-resources.xml</alt-dd>
    </module>
</application>

jms-resources.xml (this file should be placed under root instead of
/root/META-INF)

<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
            <dep:environment xmlns:dep="
http://geronimo.apache.org/xml/ns/deployment-1.2">
                <dep:moduleId>
                    <dep:groupId>org.apache.geronimo.samples</dep:groupId>
                    <dep:artifactId>jms-resources</dep:artifactId>
                    <dep:version>2.1.4</dep:version>
                    <dep:type>rar</dep:type>
                </dep:moduleId>
                <dep:dependencies>
                    <dep:dependency>

<dep:groupId>org.apache.geronimo.configs</dep:groupId>
                        <dep:artifactId>activemq-broker</dep:artifactId>
                        <dep:type>car</dep:type>
                    </dep:dependency>
                </dep:dependencies>
            </dep:environment>
            <resourceadapter>
                <resourceadapter-instance>

<resourceadapter-name>jms-resources</resourceadapter-name>
                    <nam:workmanager xmlns:nam="
http://geronimo.apache.org/xml/ns/naming-1.2">
                        <nam:gbean-link>DefaultWorkManager</nam:gbean-link>
                    </nam:workmanager>
                </resourceadapter-instance>
                <outbound-resourceadapter>
                    <connection-definition>

<connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
                        <connectiondefinition-instance>
                            <name>OrderConnectionFactory</name>

<implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>

<implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
                            <connectionmanager>
                                <xa-transaction>
                                    <transaction-caching/>
                                </xa-transaction>
                                <single-pool>
                                    <match-one/>
                                </single-pool>
                            </connectionmanager>
                        </connectiondefinition-instance>
                    </connection-definition>
                </outbound-resourceadapter>
            </resourceadapter>
            <adminobject>

<adminobject-interface>javax.jms.Queue</adminobject-interface>

<adminobject-class>org.apache.activemq.command.ActiveMQQueue</adminobject-class>
                <adminobject-instance>

<message-destination-name>OrderQueue</message-destination-name>
                    <config-property-setting
name="PhysicalName">OrderQueue</config-property-setting>
                </adminobject-instance>
            </adminobject>
            <adminobject>

<adminobject-interface>javax.jms.Topic</adminobject-interface>

<adminobject-class>org.apache.activemq.command.ActiveMQTopic</adminobject-class>
            </adminobject>
 </connector>

Furthermore, you may check out this URL to find out the exact plans for
jms-mdb sample application.

https://svn.apache.org/repos/asf/geronimo/samples/branches/2.1/samples/jms-mdb/

Any questions, please let us know.

Jeff C



On Mon, Nov 2, 2009 at 8:18 PM, Antonio ForniƩ <sitaronocturnal@gmail.com>wrote:

>
> Any help? If nobody can help for my specific problem, at least can anybody
> help me setting up this basic sample (I think it's the easier one in the
> docs):
>
> http://cwiki.apache.org/GMOxDOC21/jms-mdb-jms-and-mdb-sample-application.html
>
> Did anybody get it running only following the tutorial? Isn't there
> anything
> missing? I tried to follow the tutorial setp by step several times but it
> was never working.
>
> Otherwise, can anybody recommend me another tutorial or another way to have
> JMS and an MDB running easier than this one?
>
> Thank you very much!
>
> Antonio
> --
> View this message in context:
> http://old.nabble.com/Trying-to-set-up-a-MDB-tp26137988s134p26156693.html
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>

Mime
View raw message