Author |
Message
|
sirfvikas |
Posted: Fri Oct 23, 2009 6:25 am Post subject: MDB listen requests very slow when load on queue, sends expn |
|
|
Newbie
Joined: 22 Oct 2009 Posts: 9
|
Hi All,
We are using Jboss 4.05 GA and some MDBs have been deployed in the same to listen the requests. It works fine when we send 2-10 requests and receive but it starts sending the below Exception when the load gets increased like 1 messages/sec or more than that. Consequence it goes into backout queue.
2009-10-22 17:32:31,902 ERROR
at com.dnb.bpms.slrm.util.gateway.GCLResponseReceiverMDB.onMessage(GCLResponseReceiverMDB.java:29)
at sun.reflect.GeneratedMethodAccessor240.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:47)
at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116)
at org.jboss.ejb.plugins.contact admin.invoke(contact admin.java:109)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
at org.jboss.ejb.Container.invoke(Container.java:954)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:987)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1287)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
at com.ibm.mq.jms.MQSession$FacadeMessageListener.onMessage(MQSession.java:147)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.run(JmsSessionImpl.java:2558)
at com.ibm.mq.jms.MQSession.run(MQSession.java:860)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:196)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:595)
Thanks for your nice support always. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 23, 2009 6:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you written your MDB's onMessage method with an eye to thread safety?
This looks like it is triggered from within the onMessage method... as such it would be deemed a user problem...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sirfvikas |
Posted: Fri Oct 23, 2009 7:02 am Post subject: |
|
|
Newbie
Joined: 22 Oct 2009 Posts: 9
|
This is the way I developed the MDB, Please mention the points which you are pointing. Thanks in advance.
public abstract class SLRMMessageQueueMDB implements MessageDrivenBean, MessageListener {
private MessageDrivenContext mdbContext = null;
public void setMessageDrivenContext(MessageDrivenContext c)
throws EJBException
{
mdbContext = c;
}
public void ejbCreate(){
}
public void ejbRemove(){
}
public void onMessage (Message message){
try {
String req = ((TextMessage)message).getText();
executeAction (req);
}
catch (JMSException jmsex) {
jmsex.printStackTrace ();
Exception lex = jmsex.getLinkedException ();
if (lex!=null) {
lex.printStackTrace ();
}
//if (containerTransaction) {
mdbContext.setRollbackOnly ();
//}
}
catch (Exception ex) {
ex.printStackTrace ();
throw (new EJBException (ex));
}
}
// --------------------------------------------------------------------------
/**
This method should be implemented by subclasses to provide for the processing
of the received message.
@throws Exception If the message cannot be processed.
**/
public abstract void executeAction (String req)
throws Exception;
// ------------------------------------------------------------------------------
} |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Fri Oct 23, 2009 7:14 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
So thats an abstract class.....
Wheres the code that extends this?
If you comment out the executeAction method do you experience the same behaviour? This will help prove or disprove fjbs point (although looking at the trace I cant see the exeuteAction method being called) |
|
Back to top |
|
 |
sirfvikas |
Posted: Fri Oct 23, 2009 8:05 am Post subject: |
|
|
Newbie
Joined: 22 Oct 2009 Posts: 9
|
it is there in stack Trace. I forgot to copy that line
at com.dnb.bpms.slrm.util.gateway.GCLResponseReceiverMDB.executeAction(GCLResponseReceiverMDB.java:19) |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Fri Oct 23, 2009 8:41 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
And did you try my suggestion to help you prove / disprove fjbs logic?
This should then help you start resolving the issue on your own. |
|
Back to top |
|
 |
sirfvikas |
Posted: Fri Oct 23, 2009 9:05 am Post subject: |
|
|
Newbie
Joined: 22 Oct 2009 Posts: 9
|
Could you explain waht is fjbc logic? I dint get it |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 23, 2009 6:19 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
fjb_saper wrote: |
Have you written your MDB's onMessage method with an eye to thread safety?
This looks like it is triggered from within the onMessage method... as such it would be deemed a user problem...  |
_________________ MQ & Broker admin |
|
Back to top |
|
 |
|