Hi
I am using EJB3 MDBs on JBoss 4.0.4 application server. Since the onMessage method
takes a lot of time to complete, I was getting the below warning,
WARN [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257,
GlobalId=OPGX745-FYKH3D1/1, BranchQual=, localId=1] timed out. status=STATUS_ACTIVE
So I referred the EJB specs and as per the specs if I make the MDB to not support
transaction(TransactionAttributeType.NOT_SUPPORTED) or make it a BMT and set the
acknowledgement mode to auto-acknowledge then the message is acknowledged once its
delivered to the onMessage method and it does not depend on the BMT transaction in the
method.
I tried both the transaction not supported and the BMT but I still get the above warning
and also the message is redelivered.
Below is the code for the MDB,
@MessageDriven(activationConfig =
{
@ActivationConfigProperty(propertyName="destinationType",
propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination",
propertyValue="SonicJMS/Queues/datahub"),
@ActivationConfigProperty(propertyName="providerAdapterJNDI",
propertyValue="java:/SonicJMSProvider"),
@ActivationConfigProperty(propertyName="useDLQ",
propertyValue="false"),
@ActivationConfigProperty(propertyName="acknowledgeMode",
propertyValue="Auto-acknowledge")
})
@TransactionManagement(TransactionManagementType.CONTAINER)
public class FeedParsingManager implements MessageListener {
@EJB
private EmailNotification emailSender;
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public void onMessage(Message msg) {
....
....
....
}
}
The onMessage method calls a stateless session bean which is a BMT. Why am I seeing the
warning message and message being redelivered?
Thanks in advance,
Rajeev
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120941#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...