You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by anish pathadan <an...@gmail.com> on 2007/03/13 13:34:42 UTC

Message not getting delivered to MDB

Hi All,
      I created new JMS resource group, connection factory and topic for
Active MQ server.I could successfully send some messages to the Topic and I
could read that message using a receiver. Now I wrote another EJB module
having one MDB listening to that Topic. It seems that messages are not
delivered to the MDB.Is there anything wrong in my open-ejb-jar.xml or am I
missing anything. Please help me.



<?xml version="1.0" encoding="UTF-8"?>

<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">

<dep:environment>

<dep:moduleId>

<dep:groupId>default</dep:groupId>

<dep:artifactId>mymdb</dep:artifactId>

<dep:version>1.0</dep:version>

<dep:type>jar</dep:type>

</dep:moduleId>

<dep:dependencies>

<dep:dependency>

<dep:groupId>console.jms</dep:groupId>

<dep:artifactId>TestServiceConnectionGroup</dep:artifactId>

<dep:version>1.0</dep:version>

<dep:type>rar</dep:type>

</dep:dependency>

</dep:dependencies>

<dep:hidden-classes/>

<dep:non-overridable-classes/>

</dep:environment>

<enterprise-beans>

<message-driven>

<ejb-name>TestMDB</ejb-name>

<resource-adapter>

<resource-link>TestServiceConnectionGroup</resource-link>

</resource-adapter>

<activation-config>

<activation-config-property>

<activation-config-property-name>destination</activation-config-property-name>

<activation-config-property-value>TestServiceTopic</activation-config-property-value>

</activation-config-property>

<activation-config-property>

<activation-config-property-name>destinationType</activation-config-property-name>

<activation-config-property-value>javax.jms.Topic
</activation-config-property-value>

</activation-config-property>

</activation-config>

<resource-ref>

<ref-name>jms/TestServiceConnectionFactory</ref-name>

<resource-link>TestServiceConnectionFactory</resource-link>

</resource-ref>

<resource-env-ref>

<ref-name>jms/TestServiceTopic</ref-name>

<message-destination-link>TestServiceTopic</message-destination-link>

</resource-env-ref>

</message-driven>

</enterprise-beans>

</openejb-jar>



and ejb-jar.xml is:-

<?xml version="1.0" encoding="UTF-8"?>

<ejb-jar id="ejb-jar_ID" version="2.1" xmlns="
http://java.sun.com/xml/ns/j2ee" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">

<display-name>testejb</display-name>

<enterprise-beans>

<message-driven>

<ejb-name>TestMDB</ejb-name>

<ejb-class>ejb.TestMDB</ejb-class>

<messaging-type>javax.jms.MessageListener</messaging-type>

<transaction-type>Container</transaction-type>

<message-destination-type>javax.jms.Topic</message-destination-type>

<message-destination-link>TestServiceTopic</message-destination-link>

<resource-ref>

<description>JMS Broker</description>

<res-ref-name>jms/TestServiceConnectionFactory</res-ref-name>

<res-type>javax.jms.ConnectionFactory</res-type>

<res-auth>Container</res-auth>

</resource-ref>

<resource-env-ref>

<resource-env-ref-name>jms/TestServiceTopic</resource-env-ref-name>

<resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>

</resource-env-ref>

</message-driven>

</enterprise-beans>

<assembly-descriptor>

<container-transaction>

<method>

<ejb-name>TestMDB</ejb-name>

<method-name>*</method-name>

</method>

<trans-attribute>Required</trans-attribute>

</container-transaction>

</assembly-descriptor>

</ejb-jar>



-- 
Best Regards,
Anish Pathadan

Re: Message not getting delivered to MDB

Posted by David Jencks <da...@yahoo.com>.
The only thing I see that looks questionable is that you have a  
message-destination-link with no message-destination for it to link  
to.  I think the info in the openejb plan should be enough to find  
the topic, so I would first try removing the message-destination-link  
element and if that doesn't work try putting it back and including a  
message-destination.

thanks
david jencks

On Mar 13, 2007, at 9:02 AM, anish pathadan wrote:

> Hi David,
>    Version is 1.1.
>
> Thanks,
> Anish
>
>
> On 3/13/07, David Jencks <da...@yahoo.com> wrote:
> Which geronimo version?  mdbs are just starting to work in geronimo  
> trunk.  They should work fine in earlier versions.
>
>
> thanks
> david jencks
>
>
> On Mar 13, 2007, at 8:34 AM, anish pathadan wrote:
>
>> Hi All,
>>       I created new JMS resource group, connection factory and  
>> topic for Active MQ server.I could successfully send some messages  
>> to the Topic and I could read that message using a receiver. Now I  
>> wrote another EJB module having one MDB listening to that Topic.  
>> It seems that messages are not delivered to the MDB.Is there  
>> anything wrong in my open-ejb-jar.xml or am I missing anything.  
>> Please help me.
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1  
>> " xmlns:dep=" http://geronimo.apache.org/xml/ns/deployment-1.1">
>>
>> <dep:environment>
>>
>> <dep:moduleId>
>>
>> <dep:groupId>default</dep:groupId>
>>
>> <dep:artifactId>mymdb</dep:artifactId>
>>
>> <dep:version>1.0</dep:version>
>>
>> <dep:type>jar</dep:type>
>>
>> </dep:moduleId>
>>
>> <dep:dependencies>
>>
>> <dep:dependency>
>>
>> <dep:groupId>console.jms</dep:groupId>
>>
>> <dep:artifactId>TestServiceConnectionGroup</dep:artifactId>
>>
>> <dep:version>1.0</dep:version>
>>
>> <dep:type>rar</dep:type>
>>
>> </dep:dependency>
>>
>> </dep:dependencies>
>>
>> <dep:hidden-classes/>
>>
>> <dep:non-overridable-classes/>
>>
>> </dep:environment>
>>
>>
>>
>> <enterprise-beans>
>>
>> <message-driven>
>>
>> <ejb-name>TestMDB</ejb-name>
>>
>> <resource-adapter>
>>
>> <resource-link>TestServiceConnectionGroup</resource-link>
>>
>> </resource-adapter>
>>
>> <activation-config>
>>
>> <activation-config-property>
>>
>> <activation-config-property-name>destination</activation-config- 
>> property-name>
>>
>> <activation-config-property-value>TestServiceTopic</activation- 
>> config-property-value>
>>
>> </activation-config-property>
>>
>> <activation-config-property>
>>
>> <activation-config-property-name>destinationType</activation- 
>> config-property-name>
>>
>> <activation-config-property-value>javax.jms.Topic</activation- 
>> config-property-value>
>>
>> </activation-config-property>
>>
>> </activation-config>
>>
>> <resource-ref>
>>
>> <ref-name>jms/TestServiceConnectionFactory</ref-name>
>>
>> <resource-link>TestServiceConnectionFactory</resource-link>
>>
>> </resource-ref>
>>
>> <resource-env-ref>
>>
>> <ref-name>jms/TestServiceTopic</ref-name>
>>
>> <message-destination-link>TestServiceTopic</message-destination-link>
>>
>> </resource-env-ref>
>>
>> </message-driven>
>>
>> </enterprise-beans>
>>
>>
>>
>> </openejb-jar>
>>
>>
>>
>>
>>
>> and ejb-jar.xml is:-
>> <?
>>
>> xml version="1.0" encoding="UTF-8"?>
>> <
>>
>> ejb-jar id="ejb-jar_ID" version="2.1" xmlns=" http://java.sun.com/ 
>> xml/ns/j2ee" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance  
>> " xsi:schemaLocation=" http://java.sun.com/xml/ns/j2ee http:// 
>> java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" >
>>
>>
>> <display-name>testejb </ display-name>
>>
>>
>> <enterprise-beans>
>>
>>
>> <message-driven>
>>
>>
>> <ejb-name>TestMDB</ ejb-name>
>>
>>
>> <ejb-class>ejb.TestMDB </ ejb-class>
>>
>>
>> <messaging-type>javax.jms.MessageListener </messaging-type>
>>
>>
>> <transaction-type>Container </transaction-type>
>>
>>
>> <message-destination-type>javax.jms.Topic </message-destination-type>
>>
>>
>> <message-destination-link>TestServiceTopic </message-destination- 
>> link>
>>
>>
>> <resource-ref>
>>
>>
>> <description>JMS Broker </ description>
>>
>>
>>
>>
>> <res-ref-name>jms/TestServiceConnectionFactory </res-ref-name>
>>
>>
>> <res-type>javax.jms.ConnectionFactory </res-type>
>>
>>
>> <res-auth>Container</ res-auth>
>>
>>
>> </resource-ref>
>>
>>
>>
>>
>> <resource-env-ref>
>>
>>
>>
>>
>> <resource-env-ref-name>jms/TestServiceTopic </resource-env-ref-name>
>>
>>
>> <resource-env-ref-type>javax.jms.Topic </resource-env-ref-type>
>>
>>
>> </resource-env-ref>
>>
>>
>> </message-driven>
>>
>>
>> </enterprise-beans>
>>
>>
>> <assembly-descriptor>
>>
>>
>> <container-transaction>
>>
>>
>> <method>
>>
>>
>> <ejb-name>TestMDB</ ejb-name>
>>
>>
>> <method-name>*</ method-name>
>>
>>
>> </method>
>>
>>
>> <trans-attribute>Required </trans-attribute>
>>
>>
>> </container-transaction>
>>
>>
>> </assembly-descriptor>
>> </
>>
>> ejb-jar>
>>
>>
>>
>> -- 
>> Best Regards,
>> Anish Pathadan
>
>
>
>
>
> -- 
> Best Regards,
> Anish Pathadan


Re: Message not getting delivered to MDB

Posted by anish pathadan <an...@gmail.com>.
Hi David,
   Version is 1.1.

Thanks,
Anish


On 3/13/07, David Jencks <da...@yahoo.com> wrote:
>
> Which geronimo version?  mdbs are just starting to work in geronimo
> trunk.  They should work fine in earlier versions.
>
> thanks
> david jencks
>
>
>  On Mar 13, 2007, at 8:34 AM, anish pathadan wrote:
>
>  Hi All,
>       I created new JMS resource group, connection factory and topic for
> Active MQ server.I could successfully send some messages to the Topic and
> I could read that message using a receiver. Now I wrote another EJB module
> having one MDB listening to that Topic. It seems that messages are not
> delivered to the MDB.Is there anything wrong in my open-ejb-jar.xml or am
> I missing anything. Please help me.
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"
> xmlns:dep=" http://geronimo.apache.org/xml/ns/deployment-1.1">
>
> <dep:environment>
>
> <dep:moduleId>
>
> <dep:groupId>default</dep:groupId>
>
> <dep:artifactId>mymdb</dep:artifactId>
>
> <dep:version>1.0</dep:version>
>
> <dep:type>jar</dep:type>
>
> </dep:moduleId>
>
> <dep:dependencies>
>
> <dep:dependency>
>
> <dep:groupId>console.jms</dep:groupId>
>
> <dep:artifactId>TestServiceConnectionGroup</dep:artifactId>
>
> <dep:version>1.0</dep:version>
>
> <dep:type>rar</dep:type>
>
> </dep:dependency>
>
> </dep:dependencies>
>
> <dep:hidden-classes/>
>
> <dep:non-overridable-classes/>
>
> </dep:environment>
>
>
>
> <enterprise-beans>
>
> <message-driven>
>
> <ejb-name>TestMDB</ejb-name>
>
> <resource-adapter>
>
> <resource-link>TestServiceConnectionGroup</resource-link>
>
> </resource-adapter>
>
> <activation-config>
>
> <activation-config-property>
>
>
> <activation-config-property-name>destination</activation-config-property-name>
>
>
> <activation-config-property-value>TestServiceTopic</activation-config-property-value>
>
> </activation-config-property>
>
> <activation-config-property>
>
>
> <activation-config-property-name>destinationType</activation-config-property-name>
>
> <activation-config-property-value>javax.jms.Topic
> </activation-config-property-value>
>
> </activation-config-property>
>
> </activation-config>
>
> <resource-ref>
>
> <ref-name>jms/TestServiceConnectionFactory</ref-name>
>
> <resource-link>TestServiceConnectionFactory</resource-link>
>
> </resource-ref>
>
> <resource-env-ref>
>
> <ref-name>jms/TestServiceTopic</ref-name>
>
> <message-destination-link>TestServiceTopic</message-destination-link>
>
> </resource-env-ref>
>
> </message-driven>
>
> </enterprise-beans>
>
>
>
> </openejb-jar>
>
>
>
> and ejb-jar.xml is:-
>
> <?
> xml version="1.0" encoding="UTF-8"?>
>
> <
> ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance " xsi:schemaLocation=
> "http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
>
> <display-name>testejb </display-name>
>
> <enterprise-beans>
>
> <message-driven>
>
> <ejb-name>TestMDB</ ejb-name>
>
> <ejb-class>ejb.TestMDB </ejb-class>
>
> <messaging-type>javax.jms.MessageListener </messaging-type>
>
> <transaction-type>Container </transaction-type>
>
> <message-destination-type>javax.jms.Topic </message-destination-type>
>
> <message-destination-link>TestServiceTopic </message-destination-link>
>
> <resource-ref>
>
> <description>JMS Broker </description>
>
>
>
> <res-ref-name>jms/TestServiceConnectionFactory </res-ref-name>
>
> <res-type>javax.jms.ConnectionFactory </res-type>
>
> <res-auth>Container</ res-auth>
>
> </resource-ref>
>
>
>
> <resource-env-ref>
>
>
>
> <resource-env-ref-name>jms/TestServiceTopic </resource-env-ref-name>
>
> <resource-env-ref-type>javax.jms.Topic </resource-env-ref-type>
>
> </resource-env-ref>
>
> </message-driven>
>
> </enterprise-beans>
>
> <assembly-descriptor>
>
> <container-transaction>
>
> <method>
>
> <ejb-name>TestMDB</ ejb-name>
>
> <method-name>*</ method-name>
>
> </method>
>
> <trans-attribute>Required </trans-attribute>
>
> </container-transaction>
>
> </assembly-descriptor>
>
> </
> ejb-jar>
>
>
>
> --
> Best Regards,
> Anish Pathadan
>
>
>
>



-- 
Best Regards,
Anish Pathadan

Re: Message not getting delivered to MDB

Posted by David Jencks <da...@yahoo.com>.
Which geronimo version?  mdbs are just starting to work in geronimo  
trunk.  They should work fine in earlier versions.

thanks
david jencks

On Mar 13, 2007, at 8:34 AM, anish pathadan wrote:

> Hi All,
>       I created new JMS resource group, connection factory and  
> topic for Active MQ server.I could successfully send some messages  
> to the Topic and I could read that message using a receiver. Now I  
> wrote another EJB module having one MDB listening to that Topic. It  
> seems that messages are not delivered to the MDB.Is there anything  
> wrong in my open-ejb-jar.xml or am I missing anything. Please help me.
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"  
> xmlns:dep=" http://geronimo.apache.org/xml/ns/deployment-1.1">
>
> <dep:environment>
>
> <dep:moduleId>
>
> <dep:groupId>default</dep:groupId>
>
> <dep:artifactId>mymdb</dep:artifactId>
>
> <dep:version>1.0</dep:version>
>
> <dep:type>jar</dep:type>
>
> </dep:moduleId>
>
> <dep:dependencies>
>
> <dep:dependency>
>
> <dep:groupId>console.jms</dep:groupId>
>
> <dep:artifactId>TestServiceConnectionGroup</dep:artifactId>
>
> <dep:version>1.0</dep:version>
>
> <dep:type>rar</dep:type>
>
> </dep:dependency>
>
> </dep:dependencies>
>
> <dep:hidden-classes/>
>
> <dep:non-overridable-classes/>
>
> </dep:environment>
>
>
> <enterprise-beans>
>
> <message-driven>
>
> <ejb-name>TestMDB</ejb-name>
>
> <resource-adapter>
>
> <resource-link>TestServiceConnectionGroup</resource-link>
>
> </resource-adapter>
>
> <activation-config>
>
> <activation-config-property>
>
> <activation-config-property-name>destination</activation-config- 
> property-name>
>
> <activation-config-property-value>TestServiceTopic</activation- 
> config-property-value>
>
> </activation-config-property>
>
> <activation-config-property>
>
> <activation-config-property-name>destinationType</activation-config- 
> property-name>
>
> <activation-config-property-value>javax.jms.Topic</activation- 
> config-property-value>
>
> </activation-config-property>
>
> </activation-config>
>
> <resource-ref>
>
> <ref-name>jms/TestServiceConnectionFactory</ref-name>
>
> <resource-link>TestServiceConnectionFactory</resource-link>
>
> </resource-ref>
>
> <resource-env-ref>
>
> <ref-name>jms/TestServiceTopic</ref-name>
>
> <message-destination-link>TestServiceTopic</message-destination-link>
>
> </resource-env-ref>
>
> </message-driven>
>
> </enterprise-beans>
>
>
> </openejb-jar>
>
>
>
>
> and ejb-jar.xml is:-
> <?
>
> xml version="1.0" encoding="UTF-8"?>
> <
>
> ejb-jar id="ejb-jar_ID" version="2.1" xmlns=" http://java.sun.com/ 
> xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "  
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http:// 
> java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
>
> <display-name>testejb </display-name>
>
> <enterprise-beans>
>
> <message-driven>
>
> <ejb-name>TestMDB</ ejb-name>
>
> <ejb-class>ejb.TestMDB </ejb-class>
>
> <messaging-type>javax.jms.MessageListener </messaging-type>
>
> <transaction-type>Container </transaction-type>
>
> <message-destination-type>javax.jms.Topic </message-destination-type>
>
> <message-destination-link>TestServiceTopic </message-destination-link>
>
> <resource-ref>
>
> <description>JMS Broker </description>
>
>
> <res-ref-name>jms/TestServiceConnectionFactory </res-ref-name>
>
> <res-type>javax.jms.ConnectionFactory </res-type>
>
> <res-auth>Container</ res-auth>
>
> </resource-ref>
>
>
> <resource-env-ref>
>
>
> <resource-env-ref-name>jms/TestServiceTopic </resource-env-ref-name>
>
> <resource-env-ref-type>javax.jms.Topic </resource-env-ref-type>
>
> </resource-env-ref>
>
> </message-driven>
>
> </enterprise-beans>
>
> <assembly-descriptor>
>
> <container-transaction>
>
> <method>
>
> <ejb-name>TestMDB</ ejb-name>
>
> <method-name>*</ method-name>
>
> </method>
>
> <trans-attribute>Required </trans-attribute>
>
> </container-transaction>
>
> </assembly-descriptor>
> </
>
> ejb-jar>
>
>
>
> -- 
> Best Regards,
> Anish Pathadan