[
https://issues.apache.org/jira/browse/GERONIMO-4153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608716#action_12608716
]
Mohammed Imran commented on GERONIMO-4153:
------------------------------------------
Here is my jms resource plan
<?xml version="1.0" encoding="UTF-8"?>
<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>my.jms</dep:groupId>
<dep:artifactId>myJMSResources</dep:artifactId>
<dep:version>1.0</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>myJMSResources</resourceadapter-name>
<config-property-setting
name="ServerUrl">vm://localhost</config-property-setting>
<config-property-setting
name="MaximumRedeliveries">20</config-property-setting>
<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>ConnectionFactory</name>
<implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
<implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
<connectionmanager>
<!--<xa-transaction>-->
<!--<transaction-caching/>-->
<!--</xa-transaction>-->
<local-transaction/>
<!--<no-transaction/>-->
<single-pool>
<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
<idle-timeout-minutes>1</idle-timeout-minutes>
<match-one/>
</single-pool>
</connectionmanager>
</connectiondefinition-instance>
</connection-definition>
</outbound-resourceadapter>
</resourceadapter>
<!-- Actual Queue/Topic definitions start here -->
<!-- Define a Queue -->
<adminobject>
<adminobject-interface>javax.jms.Queue</adminobject-interface>
<adminobject-class>org.apache.activemq.command.ActiveMQQueue</adminobject-class>
<adminobject-instance>
<message-destination-name>ErrorQueue</message-destination-name>
<config-property-setting
name="PhysicalName">ErrorQueue</config-property-setting>
</adminobject-instance>
</adminobject>
</connector>
Note I have changed the transaction type from xa, local and none, and have
already changed the serverURl to be tcp://localhost:61616. However the messages
still does not seem to be redelivered.
> Messages are not being redelivered correctly
> --------------------------------------------
>
> Key: GERONIMO-4153
> URL: https://issues.apache.org/jira/browse/GERONIMO-4153
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 2.1, 2.1.1
> Environment: Geronimo 2.1.1, Windows XP SP3. Java 1.6_0_6
> Reporter: Mohammed Imran
> Attachments: javaEEApplication.ear, src.zip
>
>
> I am experiencing problems with redelivery of messages in activemq/geronimo
> it seems to not redeliver the message when a system exception occurs. I know
> that ActiveMQ has a max redelivery count, however the messages seem to stop
> being processed after 1-2 attempts. I am not getting anywhere near the max
> redelivery count.
> I enclose a very simple example. This ear simple has 1 MDB which will
> automatically throw an EJBException. (In the source code I have configured it
> to use ActiveMQ default queues and connection factory this was only done so
> you can quickly see what happens without setting up your own queue and
> connection factory. I also enclose a runnable class which will send a message
> to the queue.)
> The expected result should be MDB retires 5/10/xxx amount of times whatever
> the max redelivery count is set to and then stops redelivering the message.
> However as I have said earlier on I am not getting this, seems to only retry
> once.
> package test;
> import javax.ejb.*;
> import javax.jms.MessageListener;
> import javax.jms.Message;
> @MessageDriven(activationConfig = {
> @ActivationConfigProperty(
> propertyName = "destinationType",
> propertyValue = "javax.jms.Queue"),
> @ActivationConfigProperty(
> propertyName = "destination",
> propertyValue = TestMDBBean.QUEUE_NAME)
> ,@ActivationConfigProperty(
> propertyName = "acknowledgeMode",
> propertyValue = "Auto-acknowledge")
> })
> //@TransactionManagement(TransactionManagementType.CONTAINER)
> @TransactionAttribute(TransactionAttributeType.REQUIRED)
> public class TestMDBBean implements MessageListener {
> public static final String QUEUE_NAME =
> "SendReceiveQueue";//"ErrorQueue";;
> public void onMessage(Message message) {
> System.err.println("This is a test");
> throw new EJBException("This is a lovely test");
> }
> }
> open-ejbjar.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <openejb-jar
> xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"
> xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
> xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
> xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0">
> <enterprise-beans>
> <message-driven>
> <ejb-name>TestMDBBean</ejb-name>
> <resource-adapter>
> <!--<resource-link>MyJMSResources</resource-link>-->
> <resource-link>ActiveMQ RA</resource-link>
> </resource-adapter>
> </message-driven>
> </enterprise-beans>
> </openejb-jar>
> Geronimo application
> <?xml version="1.0" encoding="UTF-8"?>
> <application
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2"
> xmlns:security="http://geronimo.apache.org/xml/ns/security-1.2"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2"
> application-name="My">
> <sys:environment>
> <sys:moduleId>
> <sys:groupId>tester</sys:groupId>
> <sys:artifactId>mdb</sys:artifactId>
> <sys:version>1</sys:version>
> <sys:type>car</sys:type>
> </sys:moduleId>
> <sys:dependencies>
> <!--
> <sys:dependency>
> <sys:groupId>My.jms</sys:groupId>
> <sys:artifactId>MyJMSResources</sys:artifactId>
> <sys:version>1.0</sys:version>
> <sys:type>rar</sys:type>
> </sys:dependency>
> -->
> <sys:dependency>
> <sys:groupId>org.apache.geronimo.configs</sys:groupId>
> <sys:artifactId>activemq-ra</sys:artifactId>
> <sys:version>2.1.1</sys:version>
> <sys:type>car</sys:type>
> </sys:dependency>
>
> </sys:dependencies>
> <sys:hidden-classes/>
> <sys:non-overridable-classes/>
> </sys:environment>
> </application>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.