[JBoss Messaging] - Re: MaxDeliveryAttempts not working
by mariuszs
"ataylor" wrote : From the log message it looks like its the JCA layer thats sending to the DLQ not JBM. You're MDB config is probably incorrect.
|
| The JCA or App server forums should be able to help you or take a look at the MDB docs.
Im using default configuration, so the default configuration in jboss501 is not working?
<mbean code="org.jboss.jms.server.destination.QueueService"
| name="jboss.messaging.destination:service=Queue,name=MyQueue"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
|
| <attribute name="MessageCounterHistoryDayLimit">-1</attribute>
|
| <attribute name="RedeliveryDelay">300000</attribute>
|
| <attribute name="MaxDeliveryAttempts">100000</attribute>
|
| <attribute name="SecurityConfig">
| <security>
| <role name="myrole" read="true" write="true" create="true" />
| </security>
| </attribute>
| <depends optional-attribute-name="ServerPeer">
| jboss.messaging:service=ServerPeer</depends>
| <depends>jboss.messaging:service=PostOffice
| </depends>
| <attribute name="Clustered">true</attribute>
| </mbean>
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4246651#4246651
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4246651
16 years, 11 months
[JBoss Messaging] - MessageDriven Bean annotation problem
by jameshartell
Hi, I am reading JBoss in Action to try to learn how to use JBoss Messaging and I am going through the examples in the book but I have come stuck on one example and have scoured the web for documentation but couldn't find any so I am writing in my first ever forum for help.
Here is the code:
package org.jbia.jms.sofaspuds;
import javax.jms.*;
import javax.ejb.*;
@MessageDriven(activationConfig={
@ActivationConfigProperty
(propertyName="destinationType", propertyValue="javax.jms.Topic"),
@ActivationConfigProperty
(propertyName="destination", propertyValue="topic/VideoSubscribeTopic"),
@ActivationConfigProperty
(propertyName="subscriptionDurability", propertyValue="Durable"),
@ActivationConfigProperty
(propertyName="messageSelector", propertyValue="SpudsCustomer = 'James'")
})
public class WireTap implements MessageListener {
public void onMessage(Message msg){
try{
ObjectMessage objmsg = (ObjectMessage)msg;
Video video = (Video)objmsg.getObject();
System.out.println("Serveillance: perp=" +
msg.getStringProperty("SpudsCustomer" +
",video = " + video));
}catch (Exception e){
e.printStackTrace();
}
}
}
I have jboss-ejb3x.jar, jboss-j2ee.jar and jboss-messaging-client.jar on the build path as the book said I need but I get the error:
The attribute activationConfig is undefined for the annotation type MessageDriven
I am using JBoss 5.1.0.GA, I have tried using so many jar files to see if it was that but I cannot get this working, any suggestions would be much appreciated. - Thanks, James.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4246649#4246649
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4246649
16 years, 11 months